fix go version support?

This commit is contained in:
Lynn Cyrin 2019-09-11 22:45:51 -07:00
parent 223e21796c
commit 6da413ad82
No known key found for this signature in database
GPG Key ID: EE9CCB427DFEC897

View File

@ -253,7 +253,7 @@ func reorderArgs(commandFlags []Flag, args []string) []string {
func argIsFlag(commandFlags []Flag, arg string) bool { func argIsFlag(commandFlags []Flag, arg string) bool {
// this line turns `--flag` into `flag` // this line turns `--flag` into `flag`
arg = strings.ReplaceAll(arg, "-", "") arg = strings.Replace(arg, "-", "", -1)
// this line turns `flag=value` into `flag` // this line turns `flag=value` into `flag`
arg = strings.Split(arg, "=")[0] arg = strings.Split(arg, "=")[0]
// look through all the flags, to see if the `arg` is one of our flags // look through all the flags, to see if the `arg` is one of our flags