Skip to content

Commit

Permalink
Go: Implementing DEL command
Browse files Browse the repository at this point in the history
Signed-off-by: MikeMwita <[email protected]>
  • Loading branch information
MikeMwita committed Sep 30, 2024
1 parent 22a2cee commit a63d467
Show file tree
Hide file tree
Showing 3 changed files with 283 additions and 128 deletions.
14 changes: 14 additions & 0 deletions go/api/base_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -400,3 +400,17 @@ func (client *baseClient) HStrLen(key string, field string) (Result[int64], erro

return handleLongResponse(result)
}

func (client *baseClient) Del(keys []string) (int64, error) {
result, err := client.executeCommand(C.Del, keys)
if err != nil {
return 0, err
}

deletedCount, handleErr := handleLongResponse(result)
if handleErr != nil {
return 0, handleErr
}

return deletedCount, nil
}
Loading

0 comments on commit a63d467

Please sign in to comment.