Documentation
¶
Index ¶
Constants ¶
View Source
const ( APPLICATION_NAME = "example1" APPLICATION_TITLE = "example 1 title" APPLICATION_BANNER = "example 1 banner" APPLICATION_ENVIRONMENT_VARIABLE_PREFIX = "example1" )
Variables ¶
View Source
var ( Flags *application.Flags Params = application.Params{ Use: APPLICATION_NAME, Short: APPLICATION_TITLE, Long: APPLICATION_BANNER, Version: "", Configuration: configuration.Params{ File: flagParams.StringVar{ Name: "configFile", Shorthand: "", Value: "config.yaml", Usage: "config file name", }, SearchPaths: flagParams.StringSliceVar{ Name: "configSearchPaths", Shorthand: "", Value: []string{ "$PWD", }, Usage: "list of search paths", }, Env: configuration.EnvFlagParams{ Prefix: APPLICATION_ENVIRONMENT_VARIABLE_PREFIX, Keys: []string{ "hostname", "port", }, }, }, Log: logging.Params{ Enabled: flagParams.BoolVar{ Name: "log", Shorthand: "l", Value: false, Usage: "specify flag to enable logging [-l]", }, Level: flagParams.StringVar{ Name: "loglevel", Shorthand: "", Value: "error", Usage: "[error|warn|info|debug]", }, Format: flagParams.StringVar{ Name: "logformat", Shorthand: "", Value: "json", Usage: "[json|text]", }, Target: flagParams.StringVar{ Name: "logtarget", Shorthand: "", Value: "console", Usage: "[console|file] (default: console)", }, }, } )
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.