New condition in the flagIsSet function.
This commit is contained in:
parent
bebebac341
commit
b895c86fab
1 changed files with 2 additions and 1 deletions
3
main.go
3
main.go
|
@ -23,8 +23,9 @@ import (
|
|||
var goFS embed.FS
|
||||
|
||||
func flagIsSet(arg string, sfortFlag string) bool {
|
||||
arg = strings.Split(arg, "=")[0]
|
||||
if len(arg)>1 {
|
||||
if arg[0] == "-"[0] && arg[1] != "-"[0] && arg[2] != "="[0] {
|
||||
if arg[0] == "-"[0] && arg[1] != "-"[0] {
|
||||
return strings.Contains(arg, sfortFlag)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue