blob: 70e35591a8120b99eeaffec98dc1caf2fbf758c8 [file] [log] [blame] [view]
Dmitri Shuralyovbb6383d2015-02-05 19:02:00 -08001[`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 Mastersonb3551a02015-02-02 14:38:50 -08002
Frank Schröder351fd312018-03-11 16:52:53 +01003* [goyacc](https://godoc.org/golang.org/x/tools/cmd/goyacc) – Yacc for Go.
Dmitri Shuralyovbb6383d2015-02-05 19:02:00 -08004* [stringer](https://godoc.org/golang.org/x/tools/cmd/stringer) – Implements `fmt.Stringer` interface for enums.
Dmitri Shuralyov8ecaf0b2015-02-05 19:04:53 -08005* [gostringer](https://godoc.org/github.com/sourcegraph/gostringer) – Implements `fmt.GoStringer` interface for enums.
Dmitri Shuralyovbb6383d2015-02-05 19:02:00 -08006* [jsonenums](https://github.com/campoy/jsonenums) – Implements `json.Marshaler` and `json.Unmarshaler` interfaces for enums.
Dmitri Shuralyov7754f522015-05-29 18:11:14 -07007* [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 Shahbazian7ad8be52018-03-10 18:08:06 +03309* [goreuse](https://github.com/dc0d/goreuse) - Generates Go code using a package as a generic template by replacing definitions.
Damian Gryskib91fb6e2018-03-13 10:22:14 -070010* [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 Gryski48bf2ec2018-03-27 10:48:14 -070015* [protobuf](https://github.com/golang/protobuf) - protobuf
16* [thriftrw](https://github.com/thriftrw/thriftrw-go) - thrift
Damian Gryski41f25412018-03-27 11:44:53 -070017* [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