chore: fix args 0
This commit is contained in:
parent
a304a07751
commit
591bf2d8ce
2
main.go
2
main.go
@ -448,7 +448,7 @@ func init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
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)
|
fmt.Fprintf(os.Stdout, "{...} UpClapi version:%s\n",VERSION)
|
||||||
os.Exit(0)
|
os.Exit(0)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user