aduuapp

package
v0.2.22 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 28, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ViperSetup

type ViperSetup struct {
	// contains filtered or unexported fields
}

ViperSetup stores config requires to fully setup an aduu app.

func SetupViper

func SetupViper(appName string) (setup *ViperSetup, v *viper.Viper)

SetupViper sets up viper for immediate use.

func (*ViperSetup) IsWriteConfigSet

func (setup *ViperSetup) IsWriteConfigSet() bool

IsWriteConfigSet return whether the config write flag was set.

func (*ViperSetup) SetupKlogFlags

func (setup *ViperSetup) SetupKlogFlags(cmd *cobra.Command)

SetupKlogFlags adds klog flags to the given command together with a -w flag. The -w flag enables saving the current viper state to the default config file.

func (*ViperSetup) WriteConfig

func (setup *ViperSetup) WriteConfig() (err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL