Skip to content

Commit

Permalink
change collection update and collection delete cli param checks
Browse files Browse the repository at this point in the history
  • Loading branch information
nasdf committed Apr 20, 2024
1 parent 73323b2 commit d31f076
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cli/collection_delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Example: delete by filter:
}

switch {
case len(argDocID) > 0:
case argDocID != "":
docID, err := client.NewDocIDFromString(argDocID)
if err != nil {
return err
Expand Down
4 changes: 2 additions & 2 deletions cli/collection_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ Example: update private docID, with identity:
}

switch {
case len(filter) > 0 && len(updater) > 0:
case filter != "" && updater != "":
res, err := col.UpdateWithFilter(cmd.Context(), filter, updater)
if err != nil {
return err
}
return writeJSON(cmd, res)
case len(argDocID) > 0 && len(args) == 1:
case argDocID != "" && len(args) == 1:
docID, err := client.NewDocIDFromString(argDocID)
if err != nil {
return err
Expand Down

0 comments on commit d31f076

Please sign in to comment.