feat: token store is done but not tested
This commit is contained in:
+3
-3
@@ -12,9 +12,9 @@ var (
|
||||
Port = flag.Int("port", 3000, "the listening port")
|
||||
PrintVersion = flag.Bool("version", false, "print version and exit")
|
||||
LogDir = flag.String("log-dir", "", "specify the log directory")
|
||||
//Host = flag.String("host", "localhost", "the server's ip address or domain")
|
||||
//Path = flag.String("path", "", "specify a local path to public")
|
||||
//VideoPath = flag.String("video", "", "specify a video folder to public")
|
||||
//Host = flag.Key("host", "localhost", "the server's ip address or domain")
|
||||
//Path = flag.Key("path", "", "specify a local path to public")
|
||||
//VideoPath = flag.Key("video", "", "specify a video folder to public")
|
||||
//NoBrowser = flag.Bool("no-browser", false, "open browser or not")
|
||||
)
|
||||
|
||||
|
||||
@@ -32,6 +32,11 @@ func SysLog(s string) {
|
||||
_, _ = fmt.Fprintf(gin.DefaultWriter, "[SYS] %v | %s \n", t.Format("2006/01/02 - 15:04:05"), s)
|
||||
}
|
||||
|
||||
func SysError(s string) {
|
||||
t := time.Now()
|
||||
_, _ = fmt.Fprintf(gin.DefaultErrorWriter, "[SYS] %v | %s \n", t.Format("2006/01/02 - 15:04:05"), s)
|
||||
}
|
||||
|
||||
func FatalLog(v ...any) {
|
||||
t := time.Now()
|
||||
_, _ = fmt.Fprintf(gin.DefaultErrorWriter, "[FATAL] %v | %v \n", t.Format("2006/01/02 - 15:04:05"), v)
|
||||
|
||||
@@ -131,3 +131,11 @@ func GetUUID() string {
|
||||
code = strings.Replace(code, "-", "", -1)
|
||||
return code
|
||||
}
|
||||
|
||||
func Max(a int, b int) int {
|
||||
if a >= b {
|
||||
return a
|
||||
} else {
|
||||
return b
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user