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-14 21:23:38 +08:00
parent 4d816d2d5c
commit debdfaae1c
4 changed files with 7 additions and 7 deletions

View File

@ -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 != "" { // 地址命令

View File

@ -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)

View File

@ -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 }

View File

@ -148,5 +148,8 @@ func Run(arg ...string) string {
Pulse.Sleep30ms()
}
if !strings.HasSuffix(Pulse.Result(), NL) {
Pulse.Echo(NL)
}
return Pulse.Result()
}