一个用于快速初始化 Golang Web 项目的自动化工具。
- github.com/gin-gonic/gin
- github.com/spf13/viper
- github.com/tidwall/gjson
- github.com/coocood/freecache
- github.com/go-resty/resty/v2
# project_name改为你自己的项目名称
curl -s "https://raw.githubusercontent.com/helloxz/go-init/refs/heads/main/init.sh" | bash -s project_name
# 运行
go run main.go start默认端口为2080,访问http://IP:2080
- 配置文件:
data/config/config.toml - 路由:
router/routers.go - 中间件:
middleware