1
0
forked from x/icebergs
icebergs/core/code/code.go
2021-02-26 00:33:37 +08:00

31 lines
805 B
Go

package code
import (
ice "github.com/shylinux/icebergs"
"github.com/shylinux/icebergs/base/aaa"
"github.com/shylinux/icebergs/base/web"
kit "github.com/shylinux/toolkits"
)
const CODE = "code"
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) {
m.Load()
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) {
m.Save()
}},
}}
func init() {
web.Index.Register(Index, &web.Frame{},
INSTALL, COMPILE, BINPACK, WEBPACK,
VIMER, INNER, FAVOR, BENCH, PPROF,
AUTOGEN, PUBLISH, UPGRADE,
C, SH, SHY, GO, JS,
)
}