展示监控信息

This commit is contained in:
奶爸
2019-12-09 23:45:23 +08:00
parent bfe6d48927
commit 8d791d91c1
9 changed files with 157 additions and 84 deletions

View File

@@ -24,12 +24,18 @@ func ServeWeb() {
"tf": func(t time.Time) string {
return t.Format("2006年1月2号")
},
"stf": func(s uint64) string {
return time.Unix(int64(s), 0).Format("2006年1月2号 15:04")
},
"fs": func() string {
if !dao.Conf.Debug {
return ""
}
return fmt.Sprintf("%d", time.Now().UnixNano())
},
"sf": func(duration uint64) string {
return time.Duration(time.Duration(duration) * time.Second).String()
},
"bf": func(b uint64) string {
return bytefmt.ByteSize(b)
},