Files
gin-article/main.go
T
2023-03-08 20:24:16 +08:00

20 lines
266 B
Go

package main
import (
"flag"
"strconv"
)
func main() {
r := Router()
r.LoadHTMLGlob("tmpl/*")
r.Static("/statics", "./statics")
port := flag.Int("p", 88, "the port to listen on")
// 解析命令行参数
flag.Parse()
r.Run(":" + strconv.Itoa(*port))
}