diff options
Diffstat (limited to 'pkg/commands/set.go')
| -rw-r--r-- | pkg/commands/set.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/pkg/commands/set.go b/pkg/commands/set.go new file mode 100644 index 0000000..19175f1 --- /dev/null +++ b/pkg/commands/set.go @@ -0,0 +1,10 @@ +package commands + +import "redisClone/pkg/core" + +func Set(args []string, getShard func(k string) *core.Shard) interface{} { + key := args[1] + item := core.Item{Value: args[2]} + getShard(key).Data[key] = item + return core.SimpleString("OK") + }
\ No newline at end of file |
