mirror of
https://shylinux.com/x/icebergs
synced 2025-04-28 10:12:02 +08:00
opt inner.js
This commit is contained in:
parent
b31a217baf
commit
3625742900
@ -2,6 +2,7 @@ package log
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"strings"
|
"strings"
|
||||||
|
"unicode"
|
||||||
|
|
||||||
ice "shylinux.com/x/icebergs"
|
ice "shylinux.com/x/icebergs"
|
||||||
"shylinux.com/x/icebergs/base/ctx"
|
"shylinux.com/x/icebergs/base/ctx"
|
||||||
@ -27,8 +28,6 @@ func init() {
|
|||||||
ls := strings.SplitN(line, ice.SP, 6)
|
ls := strings.SplitN(line, ice.SP, 6)
|
||||||
m.Push(mdb.TIME, ls[0]+ice.SP+ls[1])
|
m.Push(mdb.TIME, ls[0]+ice.SP+ls[1])
|
||||||
m.Push(mdb.ID, ls[2])
|
m.Push(mdb.ID, ls[2])
|
||||||
m.Push("ship", ls[3])
|
|
||||||
|
|
||||||
i := strings.LastIndex(ls[5], ice.SP)
|
i := strings.LastIndex(ls[5], ice.SP)
|
||||||
if strings.HasPrefix(ls[5][i+1:], "base") || strings.HasPrefix(ls[5][i+1:], "core") || strings.HasPrefix(ls[5][i+1:], "misc") {
|
if strings.HasPrefix(ls[5][i+1:], "base") || strings.HasPrefix(ls[5][i+1:], "core") || strings.HasPrefix(ls[5][i+1:], "misc") {
|
||||||
m.Push(nfs.PATH, ice.USR_ICEBERGS)
|
m.Push(nfs.PATH, ice.USR_ICEBERGS)
|
||||||
@ -45,6 +44,17 @@ func init() {
|
|||||||
m.Push(nfs.FILE, "init.go")
|
m.Push(nfs.FILE, "init.go")
|
||||||
m.Push(nfs.LINE, "90")
|
m.Push(nfs.LINE, "90")
|
||||||
}
|
}
|
||||||
|
if ls[4] == "cmds" {
|
||||||
|
_ls := strings.SplitN(ls[5], ice.SP, 2)
|
||||||
|
ls[4] = _ls[0]
|
||||||
|
ls[5] = _ls[1]
|
||||||
|
if !unicode.IsDigit(rune(ls[5][0])) {
|
||||||
|
_ls := strings.SplitN(ls[5], ice.SP, 2)
|
||||||
|
ls[4] += ice.SP + _ls[0]
|
||||||
|
ls[5] = _ls[1]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
m.Push("ship", ls[3])
|
||||||
m.Push(ctx.ACTION, ls[4])
|
m.Push(ctx.ACTION, ls[4])
|
||||||
m.Push(mdb.TEXT, ls[5])
|
m.Push(mdb.TEXT, ls[5])
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user