From 8feb2287ccb4de20825fda799ee34cb7869d795a Mon Sep 17 00:00:00 2001 From: Ulric Qin Date: Tue, 13 Oct 2020 13:14:38 +0800 Subject: [PATCH] code refactor --- src/modules/index/index.go | 6 +----- src/modules/judge/judge.go | 6 +----- src/modules/transfer/transfer.go | 6 +----- src/modules/tsdb/tsdb.go | 6 +----- 4 files changed, 4 insertions(+), 20 deletions(-) diff --git a/src/modules/index/index.go b/src/modules/index/index.go index ede21878..eb1bf23e 100644 --- a/src/modules/index/index.go +++ b/src/modules/index/index.go @@ -28,9 +28,7 @@ var ( help *bool conf *string - version = "No Version Provided" - gitHash = "No GitHash Provided" - buildTime = "No BuildTime Provided" + version = "No Version Provided" ) func init() { @@ -41,8 +39,6 @@ func init() { if *vers { fmt.Println("Version:", version) - fmt.Println("Git Commit Hash:", gitHash) - fmt.Println("UTC Build Time:", buildTime) os.Exit(0) } diff --git a/src/modules/judge/judge.go b/src/modules/judge/judge.go index b14b8374..86797f7b 100644 --- a/src/modules/judge/judge.go +++ b/src/modules/judge/judge.go @@ -32,9 +32,7 @@ var ( help *bool conf *string - version = "No Version Provided" - gitHash = "No GitHash Provided" - buildTime = "No BuildTime Provided" + version = "No Version Provided" ) func init() { @@ -45,8 +43,6 @@ func init() { if *vers { fmt.Println("Version:", version) - fmt.Println("Git Commit Hash:", gitHash) - fmt.Println("UTC Build Time:", buildTime) os.Exit(0) } diff --git a/src/modules/transfer/transfer.go b/src/modules/transfer/transfer.go index b6c511a5..99f6ecf8 100644 --- a/src/modules/transfer/transfer.go +++ b/src/modules/transfer/transfer.go @@ -29,9 +29,7 @@ var ( help *bool conf *string - version = "No Version Provided" - gitHash = "No GitHash Provided" - buildTime = "No BuildTime Provided" + version = "No Version Provided" ) func init() { @@ -42,8 +40,6 @@ func init() { if *vers { fmt.Println("Version:", version) - fmt.Println("Git Commit Hash:", gitHash) - fmt.Println("UTC Build Time:", buildTime) os.Exit(0) } diff --git a/src/modules/tsdb/tsdb.go b/src/modules/tsdb/tsdb.go index 58c2942e..f7f1c790 100644 --- a/src/modules/tsdb/tsdb.go +++ b/src/modules/tsdb/tsdb.go @@ -28,9 +28,7 @@ var ( help *bool conf *string - version = "No Version Provided" - gitHash = "No GitHash Provided" - buildTime = "No BuildTime Provided" + version = "No Version Provided" ) func init() { @@ -41,8 +39,6 @@ func init() { if *vers { fmt.Println("Version:", version) - fmt.Println("Git Commit Hash:", gitHash) - fmt.Println("UTC Build Time:", buildTime) os.Exit(0) }