simple-develop-template

command module
v0.0.0-...-42cc2d4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 6, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

README

介绍

gin-simple-develop-template

From the previous project, slightly made some challenges, open the box to use, without submodules trouble Gin-based web backend api framework for business development

1. 初始化项目

替换项目中import的 simple-develop-template 为项目名称

2. go mod 初始化

go mod init 项目名称

3. 设置私有仓库

go env -w GOPRIVATE=*.github.com

4. 整理go mod

go mod tidy

5. 编译部署相关

部署运行
0. go build -o go-test cli.go
测试服范例
1. ./go-test -e test savePageDataCron
linux下用 supervisord 进行监控相关任务
#### 查看状态
supervisorctl status|grep goTestDemo
supervisorctl restart goTestDemo
#### conf文件路径
 /etc/supervisord.d/conf/goTestDemo.conf

#### 某台服务
[xxx@test go-websites]# cat /etc/supervisord.d/conf/goTestDemo.conf
[program:goTestDemo]
directory = /home/www/demo
command = /home/www/demo/go-test -e test savePageDataCron
autostart = true
autorestart = true
loglevel = info
stdout_logfile = /var/log/supervisor/goTestDemo.log
stderr_logfile = /var/log/supervisor/goTestDemo_stderr.log
stdout_logfile_maxbytes = 30MB
stdout_logfile_backups = 3
stdout_events_enabled = false

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package docs GENERATED BY SWAG; DO NOT EDIT This file was generated by swaggo/swag
Package docs GENERATED BY SWAG; DO NOT EDIT This file was generated by swaggo/swag
internal
pkg
support-go/bootstrap
Package config 负责配置信息
Package config 负责配置信息
support-go/helper/config
Package config 负责配置信息
Package config 负责配置信息
support-go/helper/constraints
Package constraints defines a set of useful constraints to be used with type parameters.
Package constraints defines a set of useful constraints to be used with type parameters.
support-go/helper/logger
Package logger 处理日志相关逻辑
Package logger 处理日志相关逻辑
support-go/helper/maps
Package maps defines various functions useful with maps of any type.
Package maps defines various functions useful with maps of any type.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL