mirror of
https://shylinux.com/x/icebergs
synced 2025-04-26 01:24:05 +08:00
opt some
This commit is contained in:
parent
4d816d2d5c
commit
debdfaae1c
@ -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 != "" { // 地址命令
|
||||
|
@ -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)
|
||||
|
6
info.go
6
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 }
|
||||
|
Loading…
x
Reference in New Issue
Block a user