Skip to content

Commit

Permalink
fix ./cmd -v (#90)
Browse files Browse the repository at this point in the history
fix ./cmd -v
before: 
            print nothing
after: 
        printf
         version: 
         buildDate: 
          gitCommit:
  • Loading branch information
huhu415 authored May 23, 2024
1 parent d0236ac commit fda6426
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func parseFlag() {
if err := viper.BindPFlags(pflag.CommandLine); err != nil {
panic(err)
}
if viper.GetBool("v") {
if viper.GetBool("version") {
fmt.Println("version:", version)
fmt.Println("buildDate:", buildDate)
fmt.Println("gitCommit:", gitCommit)
Expand Down

0 comments on commit fda6426

Please sign in to comment.