Skip to content

Commit 286735b

Browse files
authored
chore(docs): Update hash_commands.go (#3523)
add ctx for clarification when reading docs in comments
1 parent 363fa8e commit 286735b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

hash_commands.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,16 +116,16 @@ func (c cmdable) HMGet(ctx context.Context, key string, fields ...string) *Slice
116116

117117
// HSet accepts values in following formats:
118118
//
119-
// - HSet("myhash", "key1", "value1", "key2", "value2")
119+
// - HSet(ctx, "myhash", "key1", "value1", "key2", "value2")
120120
//
121-
// - HSet("myhash", []string{"key1", "value1", "key2", "value2"})
121+
// - HSet(ctx, "myhash", []string{"key1", "value1", "key2", "value2"})
122122
//
123-
// - HSet("myhash", map[string]interface{}{"key1": "value1", "key2": "value2"})
123+
// - HSet(ctx, "myhash", map[string]interface{}{"key1": "value1", "key2": "value2"})
124124
//
125125
// Playing struct With "redis" tag.
126126
// type MyHash struct { Key1 string `redis:"key1"`; Key2 int `redis:"key2"` }
127127
//
128-
// - HSet("myhash", MyHash{"value1", "value2"}) Warn: redis-server >= 4.0
128+
// - HSet(ctx, "myhash", MyHash{"value1", "value2"}) Warn: redis-server >= 4.0
129129
//
130130
// For struct, can be a structure pointer type, we only parse the field whose tag is redis.
131131
// if you don't want the field to be read, you can use the `redis:"-"` flag to ignore it,

0 commit comments

Comments
 (0)