展示服务器列表

This commit is contained in:
奶爸
2019-12-09 18:14:31 +08:00
parent 58277ba0b6
commit bfe6d48927
18 changed files with 173 additions and 77 deletions

View File

@@ -5,6 +5,7 @@ import (
"html/template"
"time"
"code.cloudfoundry.org/bytefmt"
"github.com/gin-gonic/gin"
"github.com/p14yground/nezha/pkg/mygin"
@@ -29,6 +30,9 @@ func ServeWeb() {
}
return fmt.Sprintf("%d", time.Now().UnixNano())
},
"bf": func(b uint64) string {
return bytefmt.ByteSize(b)
},
})
r.Static("/static", "resource/static")
r.LoadHTMLGlob("resource/template/**/*")