1
0
mirror of https://github.com/redis/go-redis.git synced 2025-09-07 07:47:24 +03:00

fix conflicts

This commit is contained in:
ofekshenawa
2025-08-11 01:42:38 +03:00
parent 76417485e2
commit a7a0af2372
2 changed files with 778 additions and 617 deletions

View File

@@ -60,7 +60,7 @@ type JSONArrTrimArgs struct {
type JSONCmd struct { type JSONCmd struct {
baseCmd baseCmd
val string val string
expanded []interface{} expanded interface{}
} }
var _ Cmder = (*JSONCmd)(nil) var _ Cmder = (*JSONCmd)(nil)
@@ -102,11 +102,11 @@ func (cmd *JSONCmd) Result() (string, error) {
} }
// Expanded returns the result of the JSON.GET command as unmarshalled JSON. // Expanded returns the result of the JSON.GET command as unmarshalled JSON.
func (cmd JSONCmd) Expanded() (interface{}, error) { func (cmd *JSONCmd) Expanded() (interface{}, error) {
if len(cmd.val) != 0 && cmd.expanded == nil { if len(cmd.val) != 0 && cmd.expanded == nil {
err := json.Unmarshal([]byte(cmd.val), &cmd.expanded) err := json.Unmarshal([]byte(cmd.val), &cmd.expanded)
if err != nil { if err != nil {
return "", err return nil, err
} }
} }
@@ -500,7 +500,7 @@ func (c cmdable) JSONMSet(ctx context.Context, params ...interface{}) *StatusCmd
} }
// JSONNumIncrBy increments the number value stored at the specified path by the provided number. // JSONNumIncrBy increments the number value stored at the specified path by the provided number.
// For more information, see https://redis.io/commands/json.numincreby // For more information, see https://redis.io/docs/latest/commands/json.numincrby/
func (c cmdable) JSONNumIncrBy(ctx context.Context, key, path string, value float64) *JSONCmd { func (c cmdable) JSONNumIncrBy(ctx context.Context, key, path string, value float64) *JSONCmd {
args := []interface{}{"JSON.NUMINCRBY", key, path, value} args := []interface{}{"JSON.NUMINCRBY", key, path, value}
cmd := newJSONCmd(ctx, args...) cmd := newJSONCmd(ctx, args...)

File diff suppressed because it is too large Load Diff