code refactor

This commit is contained in:
Ulric Qin 2020-10-13 13:14:38 +08:00
parent e8d907156c
commit 8feb2287cc
4 changed files with 4 additions and 20 deletions

View File

@ -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)
}

View File

@ -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)
}

View File

@ -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)
}

View File

@ -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)
}