Skip to content

Instantly share code, notes, and snippets.

@ripienaar
Created February 13, 2020 13:47
Show Gist options
  • Save ripienaar/655b47ae325e9be36aca29b1aaa8f25e to your computer and use it in GitHub Desktop.
Save ripienaar/655b47ae325e9be36aca29b1aaa8f25e to your computer and use it in GitHub Desktop.
20200213_choria_config_blog_1.go
type Config struct {
// LogLevel is the logging level
//
// @doc The lowest level log to add to the logfile
LogLevel string `confkey:"loglevel" default:"info" validate:"enum=debug,info,warn,error,fatal" deprecated:"1" url:"http://example.com"`
// The file to write logs to, when set to an empty string logging will be to the console
LogFile string `confkey:"logfile" type:"path_string" description:"The log file"`
Servers []string `confkey:"servers" type:"comma_split" environment:"SERVERS"` // Servers to connect to
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment