Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
JyotinderSingh committed Dec 14, 2024
1 parent 9809652 commit 98b81a0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions internal/eval/store_eval.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,10 @@ func evalSET(args []string, store *dstore.Store) *EvalResponse {
key, value = args[0], args[1]
storedValue, oType := getRawStringOrInt(value)

if oType != object.ObjTypeInt && oType != object.ObjTypeString {
return makeEvalError(diceerrors.ErrUnsupportedEncoding(int(oType)))
}

for i := 2; i < len(args); i++ {
arg := strings.ToUpper(args[i])
switch arg {
Expand Down Expand Up @@ -294,10 +298,6 @@ func evalSET(args []string, store *dstore.Store) *EvalResponse {
}
}

if oType != object.ObjTypeInt && oType != object.ObjTypeString {
return makeEvalError(diceerrors.ErrUnsupportedEncoding(int(oType)))
}

// putting the k and value in a Hash Table
store.Put(key, store.NewObj(storedValue, exDurationMs, oType), dstore.WithKeepTTL(keepttl))
if oldVal != nil {
Expand Down

0 comments on commit 98b81a0

Please sign in to comment.