Răsfoiți Sursa

更新标志以使用简短形式

将 `--version` 标志的长形式改为短形式 `-v`,以便于用户更方便地使用。代码中重复定义的行已被移除。
SongZihuan 3 luni în urmă
părinte
comite
436a1d93be
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      src/flagparser/flag.go

+ 1 - 1
src/flagparser/flag.go

@@ -29,7 +29,7 @@ func InitFlag() (err error) {
 	flag.BoolVar(&DryRun, "dry-run", DryRun, "only parser the options")
 
 	flag.BoolVar(&Verbose, "version", Verbose, "show the version")
-	flag.BoolVar(&Verbose, "version", Verbose, "show the version")
+	flag.BoolVar(&Verbose, "v", Verbose, "show the version")
 
 	flag.Parse()