gin-cli

command module
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

README

gin-cli

介绍

基于gin+gorm编写的快速搭建项目的小工具^o^

架构说明

基于go1.19

使用方法
  1. 安装go install gitee.com/eddy87/gin-cli@latest
  2. 依次执行
    1. gin-cli gen config // 生成工具所需配置文件,生成后修改自己项目的参数
    2. gin-cli gen project // 生成项目目录结构
    3. gen-cli gen db // 生成数据库模型及基础查询方法
    4. gen-cli gen services // 生成参数接收验证结构体
使用说明

目前已知问题:

  1. 数据库表面为复数时,需修改控制器自动生成的查询语句。例如users表,查询语句中应该为User
使用到的三方包
  1. github.com/urfave/cli/v2命令行包
  2. gorm.io/gengorm提供的数据库生成包
  3. github.com/spf13/viper 配置读取包

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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