Skip to content

Commit

Permalink
SNOW-1875374 Fix bug in switch (#519)
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-ikryvanos authored Jan 9, 2025
1 parent 9e44ac1 commit 0fc9779
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions services/fdb/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -1712,7 +1712,7 @@ func (r *fdbCLIGetrangekeysCmd) Execute(ctx context.Context, f *flag.FlagSet, ar
}
r.req.BeginKey = f.Arg(0)
switch f.NArg() {
case 1:
case 2:
// This could be an end key or a limit. If it parses as a integer it's a limit and there
// can't be anything else. Otherwise it's and end key and the next one must parse as a limit.
v, err := strconv.ParseInt(f.Arg(1), 10, 32)
Expand All @@ -1726,7 +1726,7 @@ func (r *fdbCLIGetrangekeysCmd) Execute(ctx context.Context, f *flag.FlagSet, ar
r.req.Limit = &wrapperspb.UInt32Value{
Value: uint32(v),
}
case 2:
case 3:
// 2nd one is a limit so has to be a number.
v, err := strconv.ParseInt(f.Arg(2), 10, 32)
if err != nil {
Expand Down

0 comments on commit 0fc9779

Please sign in to comment.