cago

command
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: MIT Imports: 4 Imported by: 0

README

Cago 脚手架

Cago有一个简单的脚手架,你可以使用脚手架快速开发你的项目

安装

go install github.com/codfrm/cago/cmd/cago@latest

使用

你可以使用cago -h来查看脚手架支持的命令

API

internal/api目录下,定义好 api 请求结构,使用下面命令和自动生成controller代码和swagger文档

internal/service目录下,定义好 service 接口,使用下面命令和自动生成service代码

cago gen
数据库模型
GORM

定义好表结构和configs文件后,使用下面命令和自动生成model代码和repository代码

cago gen gorm table_name
MongoDB

mongo数据库无需先定义数据库接口,使用下面命令即可直接生成model代码和repository代码

cago gen mongo table_name

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