1
0
mirror of https://shylinux.com/x/icebergs synced 2025-04-28 02:02:02 +08:00
icebergs/base/mdb/search.go
2023-03-23 00:13:29 +08:00

16 lines
457 B
Go

package mdb
import ice "shylinux.com/x/icebergs"
const SEARCH = "search"
func init() {
Index.MergeCommands(ice.Commands{SEARCH: {Help: "搜索", Actions: RenderAction()}})
ice.AddMerges(func(c *ice.Context, key string, cmd *ice.Command, sub string, action *ice.Action) (ice.Handler, ice.Handler) {
if sub == SEARCH {
return func(m *ice.Message, arg ...string) { m.Cmd(sub, CREATE, m.CommandKey(), m.PrefixKey()) }, nil
}
return nil, nil
})
}