ncgo

command module
v0.0.0-...-aec0189 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2024 License: MIT Imports: 8 Imported by: 0

README

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

Quick Start
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

Documentation

Overview

* Copyright 2022 CloudWeGo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.

Directories

Path Synopsis
cmd
pkg

Jump to

Keyboard shortcuts

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