update
This commit is contained in:
+6
-6
@@ -9,23 +9,23 @@ import (
|
||||
func init() {
|
||||
AddCommand("", []Function{
|
||||
{
|
||||
Rules: []string{"set ? ?"},
|
||||
Rules: []string{"set ? ? ?"},
|
||||
Handle: func(s im.Sender) interface{} {
|
||||
sillyGirl.Set(s.Get(0), s.Get(1))
|
||||
Bucket(s.Get(0)).Set(s.Get(1), s.Get(2))
|
||||
return "设置成功"
|
||||
},
|
||||
},
|
||||
{
|
||||
Rules: []string{"delete ?"},
|
||||
Rules: []string{"delete ? ?"},
|
||||
Handle: func(s im.Sender) interface{} {
|
||||
sillyGirl.Set(s.Get(), "")
|
||||
Bucket(s.Get(0)).Set(s.Get(1), "")
|
||||
return "删除成功"
|
||||
},
|
||||
},
|
||||
{
|
||||
Rules: []string{"get ?"},
|
||||
Rules: []string{"get ? ? ?"},
|
||||
Handle: func(s im.Sender) interface{} {
|
||||
v := sillyGirl.Get(s.Get())
|
||||
v := Bucket(s.Get(0)).Get(s.Get(1))
|
||||
if v == "" {
|
||||
return errors.New("空值")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user