config

package
v0.16.1 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2023 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CLIFlags []cli.Flag

Will be populated in init() below

Functions

func GetCLIFlagFromVarName

func GetCLIFlagFromVarName(name string) string

GetCLIFlagFromVarName returns the name of the CLI flag associated with a config var

Types

type Config

type Config struct {
	*viper.Viper
}

Config is a complete set of app configuration

func NewConfig

func NewConfig() *Config

NewConfig create a new Config instance

func (*Config) ShowDeprecationWarnings added in v0.14.0

func (conf *Config) ShowDeprecationWarnings(c *cli.Context, logger *cm_logger.Logger)

func (*Config) UpdateFromCLIContext

func (conf *Config) UpdateFromCLIContext(c *cli.Context) error

UpdateFromCLIContext updates a config based on flags set in CLI context

type KeyValueFlag added in v0.15.0

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

func (*KeyValueFlag) Set added in v0.15.0

func (k *KeyValueFlag) Set(value string) error

func (*KeyValueFlag) String added in v0.15.0

func (k *KeyValueFlag) String() string

Jump to

Keyboard shortcuts

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