diff options
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -3,6 +3,8 @@ package main import ( "context" "embed" + "flag" + "fmt" "log" "net/http" "os" @@ -17,7 +19,15 @@ import ( ) func main() { - parseFlags() + flag.Parse() + + if printVersion { + if gitDescribe == "" { + log.Fatal("This build has no version information") + } + fmt.Println(gitDescribe) + os.Exit(0) + } model.InitStorage() defer model.RemoveStorage() |