linstrom/flags.go

26 lines
538 B
Go
Raw Normal View History

2024-08-28 15:20:38 +00:00
package main
import "flag"
var (
flagPrettyPrint *bool = flag.Bool(
"pretty",
false,
"If set, pretty prints logging entries which would be json objects otherwise",
)
flagConfigFile *string = flag.String(
"config",
"config.toml",
"Location of the config file. Defaults to \"config.toml\"",
)
flagLogLevel *string = flag.String(
"loglevel",
"Info",
"Set the logging level. Options are: Trace, Debug, Info, Warning, Error, Fatal. Capitalisation doesn't matter. Defaults to Info",
)
)
func init() {
flag.Parse()
}