Skip to content

Commit 365e10e

Browse files
committed
cmd: fix bug around required params check
This fixes issue for map type of required parameters as seen in the createTags API where previously an API request would fail when tags[0].<something> was passed. Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
1 parent 8eae8f5 commit 365e10e

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

cmd/api.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ func init() {
6060

6161
var missingArgs []string
6262
for _, required := range api.RequiredArgs {
63+
required = strings.ReplaceAll(required, "=", "")
6364
provided := false
6465
for _, arg := range apiArgs {
6566
if strings.Contains(arg, "=") && strings.HasPrefix(arg, required) {

0 commit comments

Comments
 (0)