forked from x/icebergs
opt some
This commit is contained in:
parent
62d614d321
commit
03d6114b35
@ -2,6 +2,7 @@ package code
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
ice "github.com/shylinux/icebergs"
|
ice "github.com/shylinux/icebergs"
|
||||||
|
"github.com/shylinux/icebergs/base/aaa"
|
||||||
"github.com/shylinux/icebergs/base/web"
|
"github.com/shylinux/icebergs/base/web"
|
||||||
kit "github.com/shylinux/toolkits"
|
kit "github.com/shylinux/toolkits"
|
||||||
)
|
)
|
||||||
@ -11,7 +12,8 @@ const CODE = "code"
|
|||||||
var Index = &ice.Context{Name: CODE, Help: "编程中心", Commands: map[string]*ice.Command{
|
var Index = &ice.Context{Name: CODE, Help: "编程中心", Commands: map[string]*ice.Command{
|
||||||
ice.CTX_INIT: {Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
|
ice.CTX_INIT: {Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
|
||||||
m.Load()
|
m.Load()
|
||||||
m.Conf(PUBLISH, kit.Keym("contexts"), _contexts)
|
m.Conf(PUBLISH, kit.Keym(ice.CONTEXTS), _contexts)
|
||||||
|
m.Cmd(aaa.ROLE, aaa.WHITE, aaa.VOID, "web.code.publish")
|
||||||
}},
|
}},
|
||||||
ice.CTX_EXIT: {Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
|
ice.CTX_EXIT: {Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
|
||||||
m.Save()
|
m.Save()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user