diff options
| author | alex <[email protected]> | 2026-07-12 15:00:16 +0200 |
|---|---|---|
| committer | alex <[email protected]> | 2026-07-12 15:00:16 +0200 |
| commit | 6cb3313793bf45e197b3048f0abd2f600bf97bb5 (patch) | |
| tree | 019a0995c7f9422ec9d739c77379ee7cc1a96b9c /pkg/commands/flushall.go | |
| parent | ce9d9f8b2183bc0a31bfa40e780ae07182bc7cf8 (diff) | |
| download | redis-clone-6cb3313793bf45e197b3048f0abd2f600bf97bb5.tar.xz redis-clone-6cb3313793bf45e197b3048f0abd2f600bf97bb5.zip | |
multi exec and discardmulti/execute
Diffstat (limited to 'pkg/commands/flushall.go')
| -rw-r--r-- | pkg/commands/flushall.go | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/pkg/commands/flushall.go b/pkg/commands/flushall.go index 9f1316a..e5625c4 100644 --- a/pkg/commands/flushall.go +++ b/pkg/commands/flushall.go @@ -5,10 +5,8 @@ import ( ) func Flushall(args []string, getShard func(k string) *core.Shard) interface{} { - return dbInstance.ExecuteAll(func(shards []*core.Shard) interface{} { - for _, shard := range shards { - shard.Data = make(map[string]core.Item) - } - return core.SimpleString("OK") - }) + for _, shard := range dbInstance.Shards { + shard.Data = make(map[string]core.Item) + } + return core.SimpleString("OK") } |
