tipsy

module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2025 License: MIT

README

tipsy

tipsy is command line interface helps you work with the gin framework

English | 简体中文

Introduction

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.

Installation

go install github.com/YianAndCode/tipsy/cmd/tipsy@latest

Usage

Create a new project

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
Generate components

Tipsy provides several commands to generate different components:

  1. Create a new entity:
tipsy new entity <entity-name>
  1. Create a new repo:
tipsy new repo <repo-name>
  1. Create a new controller:
tipsy new controller <controller-name>
  1. Create a new middleware:
tipsy new middleware <middleware-name>
  1. Create a new service:
tipsy new service <service-name>

Each command will generate the corresponding Go source files with proper structure and basic implementations.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Directories

Path Synopsis
cmd
tipsy command
internal

Jump to

Keyboard shortcuts

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