Documentation ¶
Overview ¶
Package cli provides tools to create commands that support advanced configuration features, sub-commands, and allowing configuration from command-line flags, configuration files, and environment variables.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Command ¶
type Command struct { Name string Description string Configuration interface{} Resources []ResourceLoader Run func([]string) error CustomHelpFunc func(io.Writer, *Command) error Hidden bool // AllowArg if not set, disallows any argument that is not a known command or a sub-command. AllowArg bool // contains filtered or unexported fields }
Command structure contains program/command information (command name and description).
func (*Command) AddCommand ¶
AddCommand Adds a sub command.
type EnvLoader ¶
type EnvLoader struct{}
EnvLoader loads a configuration from all the environment variables prefixed with "TRAEFIK_".
type FileLoader ¶
type FileLoader struct { ConfigFileFlag string // contains filtered or unexported fields }
FileLoader loads a configuration from a file.
func (*FileLoader) GetFilename ¶
func (f *FileLoader) GetFilename() string
GetFilename returns the configuration file if any.
Click to show internal directories.
Click to hide internal directories.