1.0.4 • Published 4 months ago

go_gen_cli v1.0.4

Weekly downloads
-
License
MIT
Repository
-
Last release
4 months ago

GO_GEN_CLI

GO_GEN_CLI is a scaffolding tool based on Node.js, used for quickly creating the project structure and modules based on the Gorig framework for Go.

Installation

Install globally using npm:

npm install -g go_gen_cli

Or run directly using npx:

npx go_gen_cli@latest <command>

Quick Start

Initialize a New Project

Use the init command to create a new project:

go_gen_cli init my-new-project

Or use npx:

npx go_gen_cli@latest init my-new-project

This will create a new project in the current directory, including basic files and directories like _cmd/main.go, domain/init.go, cron/cron.go, etc.

Create a New Module

Use the create command in the project root directory to create a new module:

go_gen_cli create user

Or use npx:

npx go_gen_cli@latest create user

This will create a module named user in the project, including folders like api/, internal/, model/, and necessary code.

Generate API Documentation

Use the doc command to generate OpenAPI documentation:

# Generate documentation for all modules
go_gen_cli doc

# Generate documentation for a specific module
go_gen_cli doc user

Or use npx:

npx go_gen_cli@latest doc
npx go_gen_cli@latest doc user

After generating the documentation, you can access it through: http://127.0.0.1:8080/redoc.html

Run the Project

After entering the project directory, you can run the project using the following commands:

cd my-new-project
go run _cmd/main.go

Or run it after building:

go build -o my-new-project _cmd/main.go && ./my-new-project
1.0.4

4 months ago

1.0.3

5 months ago

1.0.2

5 months ago

1.0.1

5 months ago

1.0.0

6 months ago