mirror of
https://github.com/hanzokv/go.git
synced 2026-09-24 00:31:51 +00:00
docs: Add doc comment to HGetAll describing behavior and complexity (#3776)
* docs: Add doc comment to HGetAll describing behavior and complexity * docs: reword HGetAll comment to describe Go API return type --------- Co-authored-by: ofekshenawa <[email protected]>
This commit is contained in:
@@ -70,6 +70,13 @@ func (c cmdable) HGet(ctx context.Context, key, field string) *StringCmd {
|
||||
return cmd
|
||||
}
|
||||
|
||||
// HGetAll returns a map of all fields and values stored at key.
|
||||
//
|
||||
// Returns an empty map when key does not exist.
|
||||
//
|
||||
// Time complexity: O(N) where N is the size of the hash.
|
||||
//
|
||||
// See https://redis.io/commands/hgetall/
|
||||
func (c cmdable) HGetAll(ctx context.Context, key string) *MapStringStringCmd {
|
||||
cmd := NewMapStringStringCmd(ctx, "hgetall", key)
|
||||
_ = c(ctx, cmd)
|
||||
|
||||
Reference in New Issue
Block a user