1
0
mirror of https://shylinux.com/x/icebergs synced 2025-04-26 01:24:05 +08:00
This commit is contained in:
harveyshao 2022-03-12 21:52:26 +08:00
parent b0de72c204
commit 4d816d2d5c
2 changed files with 12 additions and 1 deletions

View File

@ -175,6 +175,8 @@ func _serve_handle(key string, cmd *ice.Command, msg *ice.Message, w http.Respon
RenderCookie(msg, v[0])
}
}
msg.Debug("what %v", msg.Option(ice.MSG_USERWEB))
msg.Debug("what %v", msg.Option(ice.MSG_SESSID))
if msg.Option(ice.MSG_USERPOD, msg.Option(ice.POD)); msg.Optionv(ice.MSG_CMDS) == nil {
if p := strings.TrimPrefix(r.URL.Path, key); p != "" { // 地址命令

View File

@ -9,6 +9,7 @@ import (
"shylinux.com/x/icebergs/base/mdb"
"shylinux.com/x/icebergs/base/nfs"
"shylinux.com/x/icebergs/base/ssh"
"shylinux.com/x/icebergs/base/tcp"
"shylinux.com/x/icebergs/base/web"
kit "shylinux.com/x/toolkits"
)
@ -88,10 +89,18 @@ func _autogen_source(m *ice.Message, main, file string) {
m.Cmd(nfs.PUSH, strings.ReplaceAll(main, ice.PT+GO, ice.PT+SHY), ice.NL, "source "+strings.TrimPrefix(file, ice.SRC+ice.PS))
}
func _autogen_mod(m *ice.Message, file string) (mod string) {
host := kit.ParseURLMap(m.Option(ice.MSG_USERWEB))[tcp.HOSTNAME]
if host == "" {
host = path.Base(kit.Path(""))
} else {
host = path.Join(host, "x", path.Base(kit.Path("")))
}
m.Debug("what %v", host)
m.Cmd(nfs.DEFS, ice.GO_MOD, kit.Format(`module %s
go 1.11
`, path.Base(kit.Path(""))))
`, host))
m.Cmd(nfs.CAT, file, func(line string) {
if strings.HasPrefix(line, "module") {