Fixed bug in os.Args iteration.
This commit is contained in:
parent
bd2c81aad1
commit
72db14ad2c
1 changed files with 3 additions and 4 deletions
7
ui.go
7
ui.go
|
@ -19,10 +19,9 @@ func init() {
|
|||
|
||||
func detectFlag(shortFlag string, fullFlag string) bool {
|
||||
for _, arg := range os.Args {
|
||||
fmt.Println(arg)
|
||||
fmt.Println(fullFlag)
|
||||
fmt.Println(arg == fullFlag)
|
||||
return containFlag(arg, shortFlag) || arg == fullFlag
|
||||
if containFlag(arg, shortFlag) || arg == fullFlag {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue