1
0
mirror of https://shylinux.com/x/icebergs synced 2025-05-03 20:07:01 +08:00
This commit is contained in:
shaoying 2021-04-05 05:41:20 +08:00
parent 58a38d095a
commit b261554dc9
2 changed files with 69 additions and 71 deletions

View File

@ -421,7 +421,10 @@ func init() {
_other_show(m, arg[0], kit.Select(arg[0], arg[1]), arg[2:]...)
}},
PARSE: {Name: "parse type=auto,json,http,form,list auto text:textarea", Help: "结构", Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
PARSE: {Name: "parse type=auto,json,http,form,list auto text:textarea", Help: "解析", Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
if len(arg) < 2 {
return
}
if arg[0] == "auto" && (strings.HasPrefix(arg[1], "{") || strings.HasPrefix(arg[1], "[")) {
arg[0] = "json"
} else if strings.HasPrefix(arg[1], "http") {

View File

@ -17,16 +17,12 @@ import (
const SPIDE = "spide"
func init() {
Index.Merge(&ice.Context{
Commands: map[string]*ice.Command{
SPIDE: {Name: "spide name=icebergs@key auto", Help: "结构图", Meta: kit.Dict(
"display", "/plugin/story/spide.js",
Index.Merge(&ice.Context{Commands: map[string]*ice.Command{
SPIDE: {Name: "spide name=icebergs auto", Help: "结构图", Meta: kit.Dict(
kit.MDB_DISPLAY, "/plugin/story/spide.js",
), Action: map[string]*ice.Action{
mdb.INPUTS: {Name: "inputs", Help: "补全", Hand: func(m *ice.Message, arg ...string) {
m.Cmdy(REPOS).Appendv(ice.MSG_APPEND, kit.Split("name,branch,commit"))
}},
code.INNER: {Name: "web.code.inner"},
ctx.COMMAND: {Name: "ctx.command"},
code.INNER: {Name: "web.code.inner"},
}, Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
if len(arg) == 0 {
// 仓库列表
@ -93,6 +89,5 @@ func init() {
}
m.SortInt(kit.MDB_LINE)
}},
},
})
}})
}