gin-develop-template
Gin-based web backend api framework for business development
替换项目中import的 develop-template
为项目名称
go mod init 项目名称
在go.mod文件种加入以下replace信息
go 1.22
replace (
github.com/JasonMetal/submodule-support-go.git v0.0.0 => ./submodule/support-go.git
github.com/JasonMetal/submodule-services-proto.git v0.0.0 => ./submodule/services-proto.git
)
mkdir submodule
git submodule add [email protected]:JasonMetal/submodule-services-proto.git submodule/services-proto.git
git submodule add [email protected]:JasonMetal/submodule-support-go.git submodule/support-go.git
git submodule add --force [email protected]:JasonMetal/submodule-services-proto.git submodule/services-proto.git
git submodule add --force [email protected]:JasonMetal/submodule-support-go.git submodule/support-go.git
git submodule update --remote --init
go env -w GOPRIVATE=*.github.com
go mod tidy
#### 查看状态
supervisorctl status|grep goTestCrawl
supervisorctl restart goTestCrawl
#### conf文件路径
/etc/supervisord.d/conf/goTestCrawl.conf
#### 某台服务
[xxx@test go-websites]# cat /etc/supervisord.d/conf/goTestCrawl.conf
[program:goTestCrawl]
directory = /home/www/demo
command = /home/www/demo/go-test -e test savePageDataCron
autostart = true
autorestart = true
loglevel = info
stdout_logfile = /var/log/supervisor/goTestCrawl.log
stderr_logfile = /var/log/supervisor/goTestCrawl_stderr.log
stdout_logfile_maxbytes = 30MB
stdout_logfile_backups = 3
stdout_events_enabled = false