Documentation
¶
Overview ¶
Package config provides types and functions to collect, validate and apply user-provided settings.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Usage = func() { fmt.Fprintf(flag.CommandLine.Output(), "%s %s\n%s\n\n", myAppName, version, myAppURL) fmt.Fprintf(flag.CommandLine.Output(), "Usage of %s:\n", os.Args[0]) flag.PrintDefaults() }
Usage is a custom override for the default Help text provided by the flag package. Here we prepend some additional metadata to the existing output.
Functions ¶
Types ¶
type Config ¶
type Config struct { // Folders to check for mail. This value is provided a comma-separated // list. Folders multiValueFlag // Username represents the account used to login to the remote mail // server. This is often in the form of an email address. Username string // Password is the remote mail server account password. Password string // Server is the fully-qualified domain name of the remote mail server. Server string // Port is the TCP port used to connect to the remote server. This is // commonly 993. Port int // LoggingLevel is the supported logging level for this application. LoggingLevel string // EmitBranding controls whether "generated by" text is included at the // bottom of application output. This output is included in the Nagios // dashboard and notifications. This output may not mix well with branding // output from other tools such as atc0005/send2teams which also insert // their own branding output. EmitBranding bool }
Config represents the application configuration as specified via command-line flags.
Click to show internal directories.
Click to hide internal directories.