Skip to content
/ gozz Public

a golang annotation analysis based strong and extensible code generation and template-programming toolkits

License

Notifications You must be signed in to change notification settings

go-zing/gozz

Repository files navigation

logo

Go Go Go Report Card Go Reference

License: MIT Last Commit codecov

Introduction

Documentation

English | 简体中文

Fast and Simple

Intuitive annotation syntax, clean and fast command line tools, runtime-dependencies-free generated codes.

Install

go install github.com/go-zing/gozz@latest

Usage

Gozz CLI is built with cobra, command syntax as follows:

gozz [--GLOBAL-FLAGS] [COMMAND] [--COMMAND-FLAGS] [ARGS]

The main plugin execute command would be:

gozz run -p "[PLUGIN][:OPTIONS]" filename

Annotation

Annotations are comments that stick with declaration object, and match syntax as follows:

// +zz:[PLUGIN][:ARGS][:OPTIONS]
type T interface{}

Check out here for more details.

Awesome Plugins

Gozz provides a series of awesome builtin plugins. Rather than Gozz provides these built-in plugins, Actually in order to integrate these plugins, we develop the toolkits named Gozz.

  • Wire Autowire DI and AOP proxy。
  • Api Generate API routing and invoker based on interface
  • Impl Sync interface and implement
  • Doc Generate runtime documentation based on comments。
  • Tag Manage structure field tags in templating。
  • Orm Generates data entity mapping code。
  • Option Generates Funcitonal Options code。

High Extensibility

We provide customizable generating templates, gozz-core for code analysis, edit and generate. External .so plugins and official external supported also.

gozz install [--output/-o] [--filepath/-f] [repository] 

Showcase

License

Apache-2.0

About

a golang annotation analysis based strong and extensible code generation and template-programming toolkits

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published