forked from x/icebergs
opt some
This commit is contained in:
parent
1fff54b9bb
commit
f962f43d99
@ -47,7 +47,7 @@ func _split_list(m *ice.Message, file string, arg ...string) map[string]interfac
|
||||
data := kit.Data(DEEP, deep)
|
||||
|
||||
// 回调函数
|
||||
ls := kit.Split(text, m.Option(SPLIT_SPACE), m.Option(SPLIT_BLOCK), m.Option(SPLIT_QUOTE))
|
||||
ls := kit.Split(text, m.Option(SPLIT_SPACE), m.Option(SPLIT_BLOCK), m.Option(SPLIT_QUOTE), m.Option(SPLIT_TRANS))
|
||||
switch cb := m.OptionCB(SPLIT).(type) {
|
||||
case func(int, []string, map[string]interface{}) []string:
|
||||
ls = cb(deep, ls, data)
|
||||
@ -87,6 +87,7 @@ const (
|
||||
SPLIT_SPACE = "split.space"
|
||||
SPLIT_BLOCK = "split.block"
|
||||
SPLIT_QUOTE = "split.quote"
|
||||
SPLIT_TRANS = "split.trans"
|
||||
)
|
||||
const SPLIT = "split"
|
||||
|
||||
|
@ -39,7 +39,7 @@ func init() {
|
||||
mdb.INPUTS: {Name: "inputs", Help: "补全", Hand: func(m *ice.Message, arg ...string) {
|
||||
m.Cmdy(AUTOGEN, mdb.INPUTS, arg)
|
||||
}},
|
||||
AUTOGEN: {Name: "create main=src/main.go@key key zone type=Zone,Hash,Data name=hi list help", Help: "模块", Hand: func(m *ice.Message, arg ...string) {
|
||||
AUTOGEN: {Name: "create main=src/main.go zone name=hi help type=Zone,Hash,Lists,Data,Code list key", Help: "模块", Hand: func(m *ice.Message, arg ...string) {
|
||||
m.Cmdy(AUTOGEN, mdb.CREATE, arg)
|
||||
}},
|
||||
COMPILE: {Name: "compile", Help: "编译", Hand: func(m *ice.Message, arg ...string) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user