deving
This commit is contained in:
0
scripts/auto.sh
Normal file
0
scripts/auto.sh
Normal file
7
scripts/lint.sh
Normal file
7
scripts/lint.sh
Normal file
@@ -0,0 +1,7 @@
|
||||
# install golang lint
|
||||
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
|
||||
|
||||
# 注意,一定不要使用自动修复
|
||||
# run lint
|
||||
golangci-lint run --out-format=tab > ./logs/lint-report.log
|
||||
|
||||
9
scripts/swag.sh
Normal file
9
scripts/swag.sh
Normal file
@@ -0,0 +1,9 @@
|
||||
# 安装 swag CLI 工具
|
||||
go install github.com/swaggo/swag/cmd/swag@latest
|
||||
|
||||
# 安装 gin-swagger 和相关依赖
|
||||
go get -u github.com/swaggo/gin-swagger
|
||||
go get -u github.com/swaggo/files
|
||||
|
||||
# 生成 swagger 文档
|
||||
swag init -g cmd/main/main.go -o ./docs
|
||||
Reference in New Issue
Block a user