Browse Source

add DeleteWithPrefix

zwde 6 years ago
parent
commit
46d023e427
1 changed files with 6 additions and 0 deletions
  1. 6 0
      client.go

+ 6 - 0
client.go

@@ -63,3 +63,9 @@ func Delete(key string) error {
 
 	return err
 }
+
+func DeleteWithPrefix(key string) error {
+	_, err := client.Delete(context.TODO(), key, clientv3.WithPrefix())
+
+	return err
+}