chore: fix args 0
This commit is contained in:
parent
a304a07751
commit
591bf2d8ce
1 changed files with 2 additions and 2 deletions
4
main.go
4
main.go
|
|
@ -448,7 +448,7 @@ func init() {
|
|||
}
|
||||
|
||||
func main() {
|
||||
if os.Args[1] == "-v" || os.Args[1] == "version" {
|
||||
if len(os.Args) > 1 && (os.Args[1] == "-v" || os.Args[1] == "version") {
|
||||
fmt.Fprintf(os.Stdout, "{...} UpClapi version:%s\n",VERSION)
|
||||
os.Exit(0)
|
||||
}
|
||||
|
|
@ -560,4 +560,4 @@ func ParseFlags() (RunFlags,error) {
|
|||
}
|
||||
// Return the configuration path
|
||||
return runFlags,nil
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue