cwgo

command module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

README

cwgo

中文 | English

cwgo 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 cwgo tool are as follows:

Tool Characteristics

  • Support for generating engineering templates

    The cwgo tool supports the generation of MVC project layout. Users only need to complete their own business code in the corresponding position according to the functions of different directories, focusing on business logic.

  • Support generating Server and Client code

    The cwgo tool supports generating Server and Client codes of Kitex and Hertz, and provides an encapsulation of Client. Users can call downstream out of the box, eliminating the cumbersome steps of encapsulating the Client.

  • Support for generating relational database code

    The cwgo tool supports generating relational database CURD code. Users no longer need to encapsulate the cumbersome CURD code by themselves, which improves the user's work efficiency.

  • Support for generating document database code

    The cwgo tool supports generating document database CURD code based on IDL (Thrift/protobuf), and currently supports Mongodb. Users no longer need to encapsulate the cumbersome CURD code by themselves, which improves the user's work efficiency.

  • Support for generating command line automatic completion scripts

    The cwgo tool supports generating command line completion scripts to improve the efficiency of user command line writing.

  • Support analysis of the relationship between Hertz project routing and (routing registration) code

    Cwgo supports analyzing Hertz project code to obtain the relationship between routing and (routing registration) code.

  • Support fallback to Kitex, Hz tools

    If you were a Kitex or Hz user before, you can still use the cwgo tool. The cwgo tool supports the fallback function and can be used as Kitex and Hz, truly realizing a tool to generate all.

Install cwgo Tool

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

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

Detailed Documentation

Quick Start
Command Line Tool

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

Template Extension

Instructions on how to customize templates can be found in the 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 To Generate relational Curd Codes, see this document

Doc

Including how to use the cwgo tool to generate document database CURD code, see this document.

Api-list

supports getting the relationship between routes and (route registration) code by analyzing Hertz project code, see this document

Server

Including how to generate RPC Server and HTTP Server code, see this document.

auto-completion

Including how to enable command line auto completion function, see this 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.

Jump to

Keyboard shortcuts

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