aboutsummaryrefslogtreecommitdiff
path: root/pkg/commands/flushall.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/commands/flushall.go')
-rw-r--r--pkg/commands/flushall.go10
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")
}