command
module
Version:
v0.2.8
Opens a new window with list of versions in this module.
Published: Dec 30, 2022
License: Apache-2.0
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
gin-cli
介绍
基于gin+gorm编写的快速搭建项目的小工具^o^
架构说明
基于go1.19
使用方法
- 安装
go install gitee.com/eddy87/gin-cli@latest
- 依次执行
gin-cli gen config
// 生成工具所需配置文件,生成后修改自己项目的参数
gin-cli gen project
// 生成项目目录结构
gen-cli gen db
// 生成数据库模型及基础查询方法
gen-cli gen services
// 生成参数接收验证结构体
使用说明
目前已知问题:
- 数据库表面为复数时,需修改控制器自动生成的查询语句。例如users表,查询语句中应该为User
使用到的三方包
github.com/urfave/cli/v2
命令行包
gorm.io/gen
gorm提供的数据库生成包
github.com/spf13/viper
配置读取包
Documentation
¶
There is no documentation for this package.
Source Files
¶
Directories
¶
Click to show internal directories.
Click to hide internal directories.