Documentation
¶
Overview ¶
Package cmd provides CLI functionality.
Index ¶
Constants ¶
View Source
const ( EnvironmentVariablePrefix = "OTF_" EnvironmentVariableFileSuffix = "_FILE" )
View Source
const DefaultLogLevel = "info"
Variables ¶
This section is empty.
Functions ¶
func CatchCtrlC ¶
func CatchCtrlC(cancel context.CancelFunc)
func PrintError ¶ added in v0.0.12
func PrintError(err error)
func SetFlagsFromEnvVariables ¶
SetFlagsFromEnvVariables overrides flag values with environment variables.
Types ¶
type LoggerConfig ¶ added in v0.0.12
type LoggerConfig struct {
Level string
// Toggle log colors. Must be one of auto, true, or false.
Color string
}
func NewLoggerConfigFromFlags ¶ added in v0.0.12
func NewLoggerConfigFromFlags(flags *pflag.FlagSet) *LoggerConfig
NewLoggerConfigFromFlags adds flags to the given flagset, and, after the flagset is parsed by the caller, the flags populate the returned logger config.
Click to show internal directories.
Click to hide internal directories.