config

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const EnvPrefix = "CAM"

Variables

This section is empty.

Functions

func AddFlagBool

func AddFlagBool(cmd *cobra.Command, flag string, def bool, usage string) (b *bool)

AddFlagBool adds an uint16 flag to the command and registers with viper and cobra.

func AddFlagString

func AddFlagString(cmd *cobra.Command, flag string, def string, usage string) (s *string)

AddFlagString adds an uint16 flag to the command and registers with viper and cobra.

func AddFlagStringSlice added in v0.2.0

func AddFlagStringSlice(cmd *cobra.Command, flag string, def []string, usage string) (s *[]string)

AddFlagStringSlice adds an uint16 flag to the command and registers with viper and cobra.

func AddFlagUint16

func AddFlagUint16(cmd *cobra.Command, flag string, def uint16, usage string) (u *uint16)

AddFlagUint16 adds an uint16 flag to the command and registers with viper and cobra.

func InitConfig

func InitConfig()

InitConfig initializes the viper config with sensible defaults for all of the CAM modules. It enables loading configuration settings from a config file named cam.yaml as well as the environment variables prefixed with EnvPrefix.

Types

This section is empty.

Jump to

Keyboard shortcuts

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