tipsy
is command line interface helps you work with the gin framework
English | 简体中文
Tipsy is a command-line tool written in Go for Gin framework projects. Similar to Laravel's artisan
, it can initialize a new Gin project and quickly generate various components like entities, repositories, controllers, middlewares, and services.
go install github.com/YianAndCode/tipsy/cmd/tipsy@latest
To create a new Gin project:
tipsy create <project-name>
This command will generate a well-structured Gin project with the following directory layout:
.
├── cmd
│ └── api
│ └── bootstrap
└── internal
├── config
├── contract
│ ├── constant
│ │ └── errcode
│ ├── datatype
│ └── error
├── controller
│ └── user
├── data
├── entity
├── log
├── middleware
│ └── auth
├── repo
│ └── user
├── router
├── server
└── service
└── user
Tipsy provides several commands to generate different components:
- Create a new entity:
tipsy new entity <entity-name>
- Create a new repo:
tipsy new repo <repo-name>
- Create a new controller:
tipsy new controller <controller-name>
- Create a new middleware:
tipsy new middleware <middleware-name>
- Create a new service:
tipsy new service <service-name>
Each command will generate the corresponding Go source files with proper structure and basic implementations.
This project is licensed under the MIT License - see the LICENSE file for details.