update print version logic to actually work

Signed-off-by: kim (grufwub) <grufwub@gmail.com>
master
kim (grufwub) 4 years ago
parent 244acba322
commit 25605a9aae

@ -101,8 +101,7 @@ func setupServer() []*GophorListener {
/* Parse parse parse!! */
flag.Parse()
if *version {
log.Printf("%s\n", GophorVersion)
os.Exit(0)
printVersionExit()
}
/* Setup the server configuration instance and enter as much as we can right now */

@ -63,3 +63,10 @@ func setupLogging(loggingType int, systemLogPath, accessLogPath string) (*log.Lo
return systemLogger, accessLogger
}
func printVersionExit() {
/* Reset the flags before printing version */
log.SetFlags(0)
log.Printf("%s\n", GophorVersion)
os.Exit(0)
}

Loading…
Cancel
Save