INNER CODE UNIT · Go
readFlags
lmorg/murex · utils/docgen/main.go:44
func readFlags() error {
flag.BoolVar(&docgen.Panic, "panic", false, "Write a stack trace on error")
flag.BoolVar(&docgen.Verbose, "verbose", false, "Verbose output (all log messages inc warnings)")
flag.BoolVar(&docgen.Warning, "warning", false, "Display warning messages (recommended)")
flag.BoolVar(&docgen.ReadOnly, "readonly", false, "Don't write output to disk. Use this to test the config")
flag.StringVar(&fConfigFile, "config", "", "Location of the base docgen config file")
version := flag.Bool("version", false, "Output docgen version number and exit")
flag.Parse()
if *version {
fmt.Printf("docgen version %s\n%s, %s", Version, License, Copyright)
os.Exit(0)
}
if fConfigFile == "" {
log.Fatalln("missing required flag: -config")