https://github.com/go-zing/gozz
a golang annotation analysis based strong and extensible code generation and template-programming toolkits
https://github.com/go-zing/gozz
codegen dependency-injection golang golang-tools template-programming
Last synced: 29 days ago
JSON representation
a golang annotation analysis based strong and extensible code generation and template-programming toolkits
- Host: GitHub
- URL: https://github.com/go-zing/gozz
- Owner: go-zing
- License: apache-2.0
- Created: 2023-10-10T06:40:06.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-04-16T08:12:53.000Z (10 months ago)
- Last Synced: 2025-04-16T09:17:15.722Z (10 months ago)
- Topics: codegen, dependency-injection, golang, golang-tools, template-programming
- Language: Go
- Homepage: https://go-zing.github.io/gozz/
- Size: 3.73 MB
- Stars: 19
- Watchers: 0
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/go-zing/gozz/actions/workflows/ci.yml)
[](https://github.com/go-zing/gozz/actions/workflows/windows.yml)
[](https://goreportcard.com/report/github.com/go-zing/gozz)
[](https://pkg.go.dev/github.com/go-zing/gozz)
[](https://github.com/go-zing/gozz/blob/master/LICENSE)
[](https://github.com/go-zing/gozz/commits)
[](https://codecov.io/gh/go-zing/gozz)
## Introduction
### Documentation
[English](https://go-zing.github.io/gozz) | [简体中文](https://go-zing.github.io/gozz/zh)
### Fast and Simple
Intuitive annotation syntax, clean and fast command line tools,
runtime-dependencies-free generated codes.
#### Install
```shell
go install github.com/go-zing/gozz@latest
```
#### Usage
`Gozz` CLI is built with [cobra](https://github.com/spf13/cobra), command syntax as follows:
```shell
gozz [--GLOBAL-FLAGS] [COMMAND] [--COMMAND-FLAGS] [ARGS]
```
The main plugin execute command would be:
```shell
gozz run -p "[PLUGIN][:OPTIONS]" filename
```
#### Annotation
Annotations are comments that stick with declaration object, and match syntax as follows:
```go
// +zz:[PLUGIN][:ARGS][:OPTIONS]
type T interface{}
```
Check out [here](https://go-zing.github.io/gozz/guide/getting-started) 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](https://go-zing.github.io/gozz/guide/plugins/wire) Autowire DI and AOP proxy。
- [Api](https://go-zing.github.io/gozz/guide/plugins/api) Generate API routing and invoker based on `interface`。
- [Impl](https://go-zing.github.io/gozz/guide/plugins/impl) Sync `interface` and `implement`。
- [Doc](https://go-zing.github.io/gozz/guide/plugins/doc) Generate runtime documentation based on comments。
- [Tag](https://go-zing.github.io/gozz/guide/plugins/tag) Manage structure field tags in templating。
- [Orm](https://go-zing.github.io/gozz/guide/plugins/orm) Generates data entity mapping code。
- [Option](https://go-zing.github.io/gozz/guide/plugins/option) Generates `Funcitonal Options` code。
### High Extensibility
We provide customizable generating templates,
[gozz-core](https://github.com/go-zing/gozz-core) for code analysis,
edit and generate.
External `.so` plugins and [official external](https://github.com/go-zing/gozz-plugins) supported also.
```shell
gozz install [--output/-o] [--filepath/-f] [repository]
```
## Showcase
- [Gozz-Core](https://github.com/go-zing/gozz-core)
- [Gozz-Plugins](https://github.com/go-zing/gozz-plugins)
- [Gozz-Doc](https://github.com/go-zing/gozz-doc)
- [Gozz-Doc-Examples](https://github.com/go-zing/gozz-doc-examples)
## License
[Apache-2.0](https://github.com/go-zing/gozz/blob/main/LICENSE)