mirror of
https://github.com/jhillyerd/inbucket.git
synced 2025-12-17 09:37:02 +00:00
inbucket cmd: add version flag (#385)
This commit is contained in:
@@ -49,6 +49,7 @@ func init() {
|
||||
func main() {
|
||||
// Command line flags.
|
||||
help := flag.Bool("help", false, "Displays help on flags and env variables.")
|
||||
versionflag := flag.Bool("version", false, "Displays version.")
|
||||
pidfile := flag.String("pidfile", "", "Write our PID into the specified file.")
|
||||
logfile := flag.String("logfile", "stderr", "Write out log into the specified file.")
|
||||
logjson := flag.Bool("logjson", false, "Logs are written in JSON format.")
|
||||
@@ -64,6 +65,10 @@ func main() {
|
||||
config.Usage()
|
||||
return
|
||||
}
|
||||
if *versionflag {
|
||||
fmt.Fprintln(os.Stdout, version)
|
||||
return
|
||||
}
|
||||
|
||||
// Process configuration.
|
||||
config.Version = version
|
||||
|
||||
Reference in New Issue
Block a user