diff --git a/base/web/serve.go b/base/web/serve.go index 0fb65340..5690a077 100644 --- a/base/web/serve.go +++ b/base/web/serve.go @@ -175,8 +175,6 @@ 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 != "" { // 地址命令 diff --git a/base/web/web.go b/base/web/web.go index d711299a..86f9fa06 100644 --- a/base/web/web.go +++ b/base/web/web.go @@ -64,8 +64,7 @@ func (web *Frame) Start(m *ice.Message, arg ...string) bool { return } msg.Log(ROUTE, "%s <- %s", s.Name, k) - m.Debug("what %v", path.Join(list[s], k)) - ice.Info.Route[path.Join(list[s], k)] = kit.FileLine(x.Hand, 3) + ice.Info.Route[path.Join(list[s], k)] = ice.FileKey(kit.FileLine(x.Hand, 300)) frame.HandleFunc(k, func(frame http.ResponseWriter, r *http.Request) { m.TryCatch(msg.Spawn(), true, func(msg *ice.Message) { _serve_handle(k, x, msg, frame, r) diff --git a/info.go b/info.go index 5e3f50bc..164eb1d7 100644 --- a/info.go +++ b/info.go @@ -60,7 +60,7 @@ source: https://shylinux.com/x/icebergs names: map[string]interface{}{}, } -func fileKey(dir string) string { +func FileKey(dir string) string { dir = strings.Split(dir, DF)[0] dir = strings.ReplaceAll(dir, ".js", ".go") dir = strings.ReplaceAll(dir, ".sh", ".go") @@ -83,10 +83,10 @@ func fileKey(dir string) string { return dir } func AddFileKey(dir, key string) { - Info.File[fileKey(dir)] = key + Info.File[FileKey(dir)] = key } func GetFileKey(dir string) string { - return Info.File[fileKey(dir)] + return Info.File[FileKey(dir)] } var Dump = func(w io.Writer, name string, cb func(string)) bool { return false } diff --git a/init.go b/init.go index ed5dcdd6..22b817e3 100644 --- a/init.go +++ b/init.go @@ -148,5 +148,8 @@ func Run(arg ...string) string { Pulse.Sleep30ms() } + if !strings.HasSuffix(Pulse.Result(), NL) { + Pulse.Echo(NL) + } return Pulse.Result() }