Dmitri Shuralyov | bb6383d | 2015-02-05 19:02:00 -0800 | [diff] [blame] | 1 | [`go generate`](https://blog.golang.org/generate) is only useful if you have tools to use it with! Here is an incomplete list of useful tools that generate code. |
Samer Masterson | b3551a0 | 2015-02-02 14:38:50 -0800 | [diff] [blame] | 2 | |
Frank Schröder | 351fd31 | 2018-03-11 16:52:53 +0100 | [diff] [blame] | 3 | * [goyacc](https://godoc.org/golang.org/x/tools/cmd/goyacc) – Yacc for Go. |
Dmitri Shuralyov | bb6383d | 2015-02-05 19:02:00 -0800 | [diff] [blame] | 4 | * [stringer](https://godoc.org/golang.org/x/tools/cmd/stringer) – Implements `fmt.Stringer` interface for enums. |
Dmitri Shuralyov | 8ecaf0b | 2015-02-05 19:04:53 -0800 | [diff] [blame] | 5 | * [gostringer](https://godoc.org/github.com/sourcegraph/gostringer) – Implements `fmt.GoStringer` interface for enums. |
Dmitri Shuralyov | bb6383d | 2015-02-05 19:02:00 -0800 | [diff] [blame] | 6 | * [jsonenums](https://github.com/campoy/jsonenums) – Implements `json.Marshaler` and `json.Unmarshaler` interfaces for enums. |
Dmitri Shuralyov | 7754f52 | 2015-05-29 18:11:14 -0700 | [diff] [blame] | 7 | * [gojson](https://github.com/ChimeraCoder/gojson) - Generates go struct definitions from example json documents. |
| 8 | * [vfsgen](https://github.com/shurcooL/vfsgen) - Generates a vfsdata.go file that statically implements the given virtual filesystem. |
Kaveh Shahbazian | 7ad8be5 | 2018-03-10 18:08:06 +0330 | [diff] [blame] | 9 | * [goreuse](https://github.com/dc0d/goreuse) - Generates Go code using a package as a generic template by replacing definitions. |
Damian Gryski | b91fb6e | 2018-03-13 10:22:14 -0700 | [diff] [blame] | 10 | * [embedfiles](https://4d63.com/embedfiles) - Embeds files into Go code. |
| 11 | * [ragel](https://www.colm.net/open-source/ragel/) - State machine compiler |
| 12 | * [peachpy](https://github.com/Maratyszcza/PeachPy) - x86-64 assembler embedded in Python, generates Go assembly |
| 13 | * [bundle](https://godoc.org/golang.org/x/tools/cmd/bundle) - Bundle creates a single-source-file version of a source package suitable for inclusion in a particular target package. |
| 14 | * [msgp](https://github.com/tinylib/msgp) - A Go code generator for MessagePack |
Damian Gryski | 48bf2ec | 2018-03-27 10:48:14 -0700 | [diff] [blame] | 15 | * [protobuf](https://github.com/golang/protobuf) - protobuf |
| 16 | * [thriftrw](https://github.com/thriftrw/thriftrw-go) - thrift |
Damian Gryski | 41f2541 | 2018-03-27 11:44:53 -0700 | [diff] [blame] | 17 | * [gogen-avro](https://github.com/actgardner/gogen-avro) - avro |
| 18 | * [swagger-gen-types](https://github.com/dnephin/swagger-gen-types) - go types from swagger specifications |