Initial commit

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
谢宇宁
2026-10-22 14:47:17 +07:00
co-authored by Claude Opus 5.5
commit 3639d2184a
574 changed files with 61690 additions and 0 deletions
Executable
+44
View File
@@ -0,0 +1,44 @@
#!/bin/bash
export GOPATH=$(cd $(dirname $0)/../;pwd)
export PATH=${PATH}:${GOPATH}/bin
curDir=$(cd $(dirname $0);pwd)
cd ${curDir}
which swag
if [ $? -ne 0 ]; then
echo "未发现swag,拉取最新swag"
go get github.com/swaggo/swag/cmd/swag
fi
prepare=(
"github.com/swaggo/gin-swagger"
"github.com/swaggo/gin-swagger/swaggerFiles"
)
for goget in ${prepare[@]};do
go get ${goget}
if [ $? -ne 0 ]; then
echo "拉取${goget}失败,终止构建"
exit 1
fi
done
echo "package main;func main() {}" > main.go
swag init --exclude web --output app/docs
if [ $? -ne 0 ]; then
echo "执行swag init失败,终止构建"
rm main.go
exit 1
fi
swag init --exclude app --output web/docs
if [ $? -ne 0 ]; then
echo "执行swag init失败,终止构建"
rm main.go
exit 1
fi
rm main.go