mirror of
https://shylinux.com/x/icebergs
synced 2025-06-26 18:37:29 +08:00
opt some
This commit is contained in:
parent
58a38d095a
commit
b261554dc9
@ -421,7 +421,10 @@ func init() {
|
|||||||
_other_show(m, arg[0], kit.Select(arg[0], arg[1]), arg[2:]...)
|
_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], "[")) {
|
if arg[0] == "auto" && (strings.HasPrefix(arg[1], "{") || strings.HasPrefix(arg[1], "[")) {
|
||||||
arg[0] = "json"
|
arg[0] = "json"
|
||||||
} else if strings.HasPrefix(arg[1], "http") {
|
} else if strings.HasPrefix(arg[1], "http") {
|
||||||
|
@ -17,16 +17,12 @@ import (
|
|||||||
const SPIDE = "spide"
|
const SPIDE = "spide"
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
Index.Merge(&ice.Context{
|
Index.Merge(&ice.Context{Commands: map[string]*ice.Command{
|
||||||
Commands: map[string]*ice.Command{
|
SPIDE: {Name: "spide name=icebergs auto", Help: "结构图", Meta: kit.Dict(
|
||||||
SPIDE: {Name: "spide name=icebergs@key auto", Help: "结构图", Meta: kit.Dict(
|
kit.MDB_DISPLAY, "/plugin/story/spide.js",
|
||||||
"display", "/plugin/story/spide.js",
|
|
||||||
), Action: map[string]*ice.Action{
|
), 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"},
|
ctx.COMMAND: {Name: "ctx.command"},
|
||||||
|
code.INNER: {Name: "web.code.inner"},
|
||||||
}, Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
|
}, Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
|
||||||
if len(arg) == 0 {
|
if len(arg) == 0 {
|
||||||
// 仓库列表
|
// 仓库列表
|
||||||
@ -93,6 +89,5 @@ func init() {
|
|||||||
}
|
}
|
||||||
m.SortInt(kit.MDB_LINE)
|
m.SortInt(kit.MDB_LINE)
|
||||||
}},
|
}},
|
||||||
},
|
}})
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user