From 61e20e914f0ffd7ec4a9c87e31dd16d3003a114b Mon Sep 17 00:00:00 2001 From: Riley Date: Sun, 22 Aug 2021 12:03:45 -0700 Subject: [PATCH] Minor bug fixes --- arguments.go | 3 +++ util.go | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/arguments.go b/arguments.go index c5c5c83..c358d2a 100644 --- a/arguments.go +++ b/arguments.go @@ -269,6 +269,9 @@ func findAllOptionArgs(argString []string, keys []string, infoArgs *orderedmap.O continue } vv := iA.(*ArgInfo) + if vv.Match == ArgContent { + return *args, true, argString, keys + } if vv.Required { if vv.TypeGuard != String { var value string diff --git a/util.go b/util.go index a1fc31e..8535454 100644 --- a/util.go +++ b/util.go @@ -35,7 +35,7 @@ func RemoveItems(slice []string, indexes []int) []string { } copy(newSlice, slice) for _, v := range indexes { - if len(newSlice) > v+1 && v != 0 { + if len(newSlice) < v+1 && v != 0 { v = v - 1 } //newSlice[v] = newSlice[len(newSlice)-1]