scaffold-gin

command module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2022 License: MIT Imports: 1 Imported by: 0

README

Scaffold-gin

GitHub GitHub go.mod Go version

Scaffold-gin是一个基于go语言gin框架的web案例,专注于前后端分离的业务场景。目的是为初学者提供一个清晰的web项目主线逻辑,对基础功能实现封装。

主要使用的技术栈:

Deployment

环境依赖: mysql > 8.0, redis > 6.0。

快速部署项目:

# 获取项目
git clone https://github.com/mjiee/scaffold-gin.git

# 编译项目
go build

# 修改配置文件
vi ./conf/default.yaml

# 初始化项目
./scaffold-gin check -c ./conf/default.yaml
./scaffold-gin init -c ./conf/default.yaml

# 运行项目
./scaffold-gin run -c ./conf/default.yaml

Documentation

其他服务:

# swagger文档生成
swag init --parseDependency --output ./app/docs
go build -tags "dev"
# api访问地址: /api/v1/swagger/index.html

# 依赖代码生成
wire

自定义错误码:

10001  # 参数验证相关错误    
20001  # token认证相关错误   
30001  # 业务逻辑相关错误

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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