From d678fda96e6878a514f16663a104ed2bacd84e31 Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Fri, 20 Oct 2023 14:24:49 -0700 Subject: [PATCH] main: print version to stdout --- main.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.go b/main.go index 6e31f0e0..30252c97 100644 --- a/main.go +++ b/main.go @@ -2,6 +2,7 @@ package main import ( "encoding/json" + "fmt" "io/ioutil" "log" "net/http" @@ -12,7 +13,7 @@ import ( ) const ( - VERSION = "0.1.17" + VERSION = "0.1.18" ) type Handler struct { @@ -250,9 +251,8 @@ func main() { for _, arg := range os.Args[1:] { if arg == "-version-monitor" { c.VersionMonitor = true - } else if arg == "-test" { - // Just run the binary for test - log.Println("go-vod " + VERSION) + } else if arg == "-version" { + fmt.Print("go-vod " + VERSION) return } else { // Config file