go-generate-examples

module
v0.0.0-...-7376487 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: MIT

README

go-generate-examples

name description
goyacc Go的Yacc。
stringer 实现fmt.Stringer枚举的接口。
gostringer fmt.GoStringer为枚举实现接口。
jsonenums 枚举的实现json.Marshaler和json.Unmarshaler接口。
go-syncmap 使用软件包作为的通用模板生成Go代码sync.Map。
go-syncpool 使用软件包作为的通用模板生成Go代码sync.Pool。
go-atomicvalue 使用软件包作为的通用模板生成Go代码atomic.Value。
go-nulljson 使用包作为实现database/sql.Scanner和的通用模板生成Go代码database/sql/driver.Valuer。
go-enum 使用包作为实现接口的通用模板生成Go代码fmt.Stringer binary, json,text,sql,yaml枚举。
go-import 执行非go文件的自动导入。
gojson 从示例json文档生成go结构定义。
vfsgen 生成静态实现给定虚拟文件系统的vfsdata.go文件。
goreuse 使用包作为通用模板通过替换定义来生成Go代码。
embedfiles 将文件嵌入Go代码。
ragel 状态机编译器
peachpy 嵌入在Python中的x86-64汇编器,生成Go汇编
bundle Bundle创建适用于包含在特定目标软件包中的源软件包的单一源文件版本。
msgp MessagePack的Go代码生成器
protobuf protobuf
thriftrw thrift
gogen-avro avro
swagger-gen-types 从swagger定义中去生成代码
avo 使用Go生成汇编代码
Wire Go的编译时依赖注入
sumgen 从sum-type声明生成接口方法实现
interface-extractor 生成所需类型的接口,仅在包内使用方法。
deep-copy 为给定类型创建深度复制方法。
swagger-doc 自动生成swagger文件并加载swagger服务
easyjson 生成高性能的JSON序列化和反序列化接口,避免使用系统默认生成的基于反射的接口
ifacepropagate 生成已有结构/类型/接口导出的wrapper来为已有接口提供附加功能
enumer 枚举生成text(string)/json/yaml/sql序列化、反序列化接口

references

https://blog.golang.org/generate https://www.jianshu.com/p/baee606f1056

Directories

Path Synopsis
go:generate ifacepropagate .
go:generate ifacepropagate .
json text yaml sql enumer -type=MemberState -json -transform=snake
json text yaml sql enumer -type=MemberState -json -transform=snake
ext

Jump to

Keyboard shortcuts

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