From 6da413ad825dea1f74563bdfee1f8e5c23c1c650 Mon Sep 17 00:00:00 2001 From: Lynn Cyrin Date: Wed, 11 Sep 2019 22:45:51 -0700 Subject: [PATCH] fix go version support? --- command.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command.go b/command.go index 6e09a32..0a6b6ed 100644 --- a/command.go +++ b/command.go @@ -253,7 +253,7 @@ func reorderArgs(commandFlags []Flag, args []string) []string { func argIsFlag(commandFlags []Flag, arg string) bool { // this line turns `--flag` into `flag` - arg = strings.ReplaceAll(arg, "-", "") + arg = strings.Replace(arg, "-", "", -1) // this line turns `flag=value` into `flag` arg = strings.Split(arg, "=")[0] // look through all the flags, to see if the `arg` is one of our flags