Skip to content
/ ncgo Public

ncgo is an all-in-one code generation tool for CloudWeGo. It integrates the advantages of various components to improve the developer experience

License

Notifications You must be signed in to change notification settings

baoyxing/ncgo

Repository files navigation

ncgo

中文 | English

ncgo is an all-in-one code generation tool for CloudWeGo. It integrates the advantages of various components to improve the developer experience. The main features of ncgo tool are as follows:

Tool Characteristics

  • User-friendly generation method

    ncgo tool provides both interactive command line and static command line methods. The interactive command line can generate code at a low cost, without worrying about passing parameters or executing multiple commands, which is suitable for most users; while advanced users with specific needs can still use regular static commands to construct generation commands.

  • Supports generating project templates

    ncgo tool supports generating MVC project layouts. Users only need to complete their own business logic in the corresponding locations according to the functionality of different directories, focusing on business logic.

  • Supports generating server and client code

    ncgo supports generating Kitex and Hertz's server and client code, providing encapsulation for clients. Users can use it out of the box to call downstream services, saving them from cumbersome steps such as packaging clients.

  • Supports generating database code

    ncgo tool supports generating database CURD (Create Update Read Delete) codes. Users no longer need to package tedious CURD codes themselves, thereby improving work efficiency.

  • Support fallback to Kitex and Hz tools

    If you were a user of Kitex or Hz before, you can still use the cwgo tool. With its rollback function support backward compatibility with these tools.

Install ncgo Tool

# Go 1.15 and earlier version
GO111MODULE=on GOPROXY=https://goproxy.cn/,direct go get github.com/baoyxing/ncgo@latest

# Go 1.16 and later version
GOPROXY=https://goproxy.cn/,direct go install github.com/baoyxing/ncgo@latest

Detailed Documentation

Command Line Tool

Contains detailed documentation on how cwgo CLI works, see this document

Layout

This documents explains Layouts discussing how layout are generated, see this document.

Client

The document details on how Generated Clients that have been Encapsulated Can be used, see this document

DB

Details information containing HOW TO Use cwgo TOOL GEN To Generate Curd Codes, see this document

Template Extension

Instructions on how to customize templates can be found in the document.

Open Source License

cwgo is based on Apache License 2.0, Apache License. Its dependent third-party component open-source licenses will include Licenses.

Contact Us

About

ncgo is an all-in-one code generation tool for CloudWeGo. It integrates the advantages of various components to improve the developer experience

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages