main: print version to stdout

monorepo
Varun Patil 2023-10-20 14:24:49 -07:00
parent ad79aa5827
commit d678fda96e
1 changed files with 4 additions and 4 deletions

View File

@ -2,6 +2,7 @@ package main
import ( import (
"encoding/json" "encoding/json"
"fmt"
"io/ioutil" "io/ioutil"
"log" "log"
"net/http" "net/http"
@ -12,7 +13,7 @@ import (
) )
const ( const (
VERSION = "0.1.17" VERSION = "0.1.18"
) )
type Handler struct { type Handler struct {
@ -250,9 +251,8 @@ func main() {
for _, arg := range os.Args[1:] { for _, arg := range os.Args[1:] {
if arg == "-version-monitor" { if arg == "-version-monitor" {
c.VersionMonitor = true c.VersionMonitor = true
} else if arg == "-test" { } else if arg == "-version" {
// Just run the binary for test fmt.Print("go-vod " + VERSION)
log.Println("go-vod " + VERSION)
return return
} else { } else {
// Config file // Config file