diff --git a/base/shy.go b/base/shy.go index fb8c7435..f620ab45 100644 --- a/base/shy.go +++ b/base/shy.go @@ -1,3 +1,18 @@ package shy -import () +import ( + _ "github.com/shylinux/icebergs/base/aaa" + _ "github.com/shylinux/icebergs/base/cli" + _ "github.com/shylinux/icebergs/base/ctx" + _ "github.com/shylinux/icebergs/base/web" + + _ "github.com/shylinux/icebergs/base/gdb" + _ "github.com/shylinux/icebergs/base/lex" + _ "github.com/shylinux/icebergs/base/log" + _ "github.com/shylinux/icebergs/base/yac" + + _ "github.com/shylinux/icebergs/base/mdb" + _ "github.com/shylinux/icebergs/base/nfs" + _ "github.com/shylinux/icebergs/base/ssh" + _ "github.com/shylinux/icebergs/base/tcp" +) diff --git a/base/web/space.go b/base/web/space.go index 9d5a22f9..211812e4 100644 --- a/base/web/space.go +++ b/base/web/space.go @@ -119,9 +119,10 @@ func _space_send(m *ice.Message, space string, arg ...string) { func _space_echo(msg *ice.Message, source, target []string, c *websocket.Conn, name string) { msg.Optionv(ice.MSG_SOURCE, source) msg.Optionv(ice.MSG_TARGET, target) - c.WriteMessage(1, []byte(msg.Format("meta"))) + e := c.WriteMessage(1, []byte(msg.Format("meta"))) + msg.Assert(e) target = append([]string{name}, target...) - msg.Info("send %v %v->%v %v %v", 1, source, target, msg.Detailv(), msg.Format("meta")) + msg.Log("send", "%v->%v %v %v", source, target, msg.Detailv(), msg.Format("meta")) } func _space_exec(msg *ice.Message, source, target []string, c *websocket.Conn, name string) { msg = msg.Cmd() @@ -138,7 +139,7 @@ func _space_handle(m *ice.Message, safe bool, send map[string]*ice.Message, c *w socket, msg := c, m.Spawns(b) target := kit.Simple(msg.Optionv(ice.MSG_TARGET)) source := kit.Simple(msg.Optionv(ice.MSG_SOURCE), name) - msg.Info("recv %v<-%v %s %v", target, source, msg.Detailv(), msg.Format("meta")) + msg.Log("recv", "%v<-%v %s %v", target, source, msg.Detailv(), msg.Format("meta")) if len(target) == 0 { msg.Option(ice.MSG_USERROLE, aaa.UserRole(msg, msg.Option(ice.MSG_USERNAME))) diff --git a/core/shy.go b/core/shy.go index fb8c7435..5f10759b 100644 --- a/core/shy.go +++ b/core/shy.go @@ -1,3 +1,9 @@ package shy -import () +import ( + _ "github.com/shylinux/icebergs/core/chat" + _ "github.com/shylinux/icebergs/core/code" + _ "github.com/shylinux/icebergs/core/mall" + _ "github.com/shylinux/icebergs/core/team" + _ "github.com/shylinux/icebergs/core/wiki" +) diff --git a/misc/shy.go b/misc/shy.go index c3cb8579..be9ac41e 100644 --- a/misc/shy.go +++ b/misc/shy.go @@ -1,3 +1,9 @@ package misc -import () +import ( + _ "github.com/shylinux/icebergs/misc/docker" + _ "github.com/shylinux/icebergs/misc/git" + _ "github.com/shylinux/icebergs/misc/tmux" + _ "github.com/shylinux/icebergs/misc/vim" + _ "github.com/shylinux/icebergs/misc/zsh" +)