Gozz 注解分析代码生成工具开源!支持依赖注入 AOP API接口生成等

just_maple · · 761 次点击 · 开始浏览    置顶
这是一个创建于 的主题,其中的信息可能已经有所发展或是发生改变。

<p align="center"> <a href="https://github.com/go-zing/gozz" target="_blank"> <img width="200" src="https://raw.githubusercontent.com/go-zing/gozz-doc/main/docs/.vuepress/public/logo.png" alt="logo"> </a> </p> <div align=center> [![Go](https://github.com/go-zing/gozz/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/go-zing/gozz/actions/workflows/build.yml) [![Go Report Card](https://goreportcard.com/badge/github.com/go-zing/gozz)](https://goreportcard.com/report/github.com/go-zing/gozz) [![Go Reference](https://pkg.go.dev/badge/github.com/go-zing/gozz.svg)](https://pkg.go.dev/github.com/go-zing/gozz) [![License: MIT](https://img.shields.io/github/license/go-zing/gozz)](https://github.com/go-zing/gozz/blob/master/LICENSE) [![Last Commit](https://img.shields.io/github/last-commit/go-zing/gozz)](https://github.com/go-zing/gozz/commits) [![codecov](https://codecov.io/gh/go-zing/gozz/branch/main/graph/badge.svg)](https://codecov.io/gh/go-zing/gozz) </div> ## 介绍 ### 文档 [English](https://go-zing.github.io/gozz) | [简体中文](https://go-zing.github.io/gozz/zh) ### 简单易用 #### 安装 ```shell go install github.com/go-zing/gozz@latest ``` #### 使用 `Gozz` CLI工具 使用以下的语法: ```shell gozz [--GLOBAL-FLAGS] [COMMAND] [--COMMAND-FLAGS] [ARGS] ``` 使用插件执行指令 ```shell gozz run -p "[PLUGIN][:OPTIONS]" filename ``` #### 注解 注解是一种特殊的注释,所有`gozz`注解遵循以下的格式 ```go // +zz:[PLUGIN][:ARGS][:OPTIONS] type T interface{} ``` 可以在这里看到更详细的介绍 [点我](https://go-zing.github.io/gozz/guide/getting-started) ### 内置插件 - [Wire](https://go-zing.github.io/gozz/zh/guide/plugins/wire) 自动化依赖注入 和 AOP代理 - [Api](https://go-zing.github.io/gozz/zh/guide/plugins/api) 生成API接口路由层 - [Impl](https://go-zing.github.io/gozz/zh/guide/plugins/impl) 接口依赖实现同步 - [Doc](https://go-zing.github.io/gozz/zh/guide/plugins/doc) 生成运行时注释表 - [Tag](https://go-zing.github.io/gozz/zh/guide/plugins/tag) 模板化管理结构体标签 - [Orm](https://go-zing.github.io/gozz/zh/guide/plugins/orm) 生成ORM实体映射结构体 - [Option](https://go-zing.github.io/zh/gozz/guide/plugins/option) 生成 `Funcitonal Options` 风格代码 ### 高拓展性 提供核心依赖库 [gozz-core](https://github.com/go-zing/gozz-core)用于代码分析和生成 支持外部插件 `.so` 提供官方插件开发实例 [official external](https://github.com/go-zing/gozz-plugins) 快速安装插件命令 ```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)

有疑问加站长微信联系(非本文作者)

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

761 次点击  
加入收藏 微博
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传