From 1470772a00faad4a5b4130e0fe47513e5618e31d Mon Sep 17 00:00:00 2001 From: alex Date: Sat, 11 Jul 2026 11:57:44 +0200 Subject: refactored some more commands to work with the new command registry --- pkg/commands/exists.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 pkg/commands/exists.go (limited to 'pkg/commands/exists.go') diff --git a/pkg/commands/exists.go b/pkg/commands/exists.go new file mode 100644 index 0000000..42a0f01 --- /dev/null +++ b/pkg/commands/exists.go @@ -0,0 +1,13 @@ +package commands + +import "redisClone/pkg/core" + +func Exists(args []string, getShard func(k string) *core.Shard) interface{}{ + _, exists := getShard(args[1]).Data[args[1]] + if exists { + return 1 + } else { + return 0 + } + +} \ No newline at end of file -- cgit v1.2.3