MCPcopy
hub / github.com/redis/go-redis / HMGet

Method HMGet

hash_commands.go:112–122  ·  view source on GitHub ↗

HMGet returns the values for the specified fields in the hash stored at key. It returns an interface{} to distinguish between empty string and nil value.

(ctx context.Context, key string, fields ...string)

Source from the content-addressed store, hash-verified

110// HMGet returns the values for the specified fields in the hash stored at key.
111// It returns an interface{} to distinguish between empty string and nil value.
112func (c cmdable) HMGet(ctx context.Context, key string, fields ...string) *SliceCmd {
113 args := make([]interface{}, 2+len(fields))
114 args[0] = "hmget"
115 args[1] = key
116 for i, field := range fields {
117 args[2+i] = field
118 }
119 cmd := NewSliceCmd(ctx, args...)
120 _ = c(ctx, cmd)
121 return cmd
122}
123
124// HSet accepts values in following formats:
125//

Callers

nothing calls this directly

Calls 1

NewSliceCmdFunction · 0.85

Tested by

no test coverage detected