No description
  • Go 78.5%
  • Dockerfile 21.5%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-07-20 15:36:14 -04:00
.github add workflow permissions 2025-01-31 19:53:59 +00:00
Dockerfile chore: update Go version to 1.25.12 2026-07-20 17:56:44 +00:00
go.mod chore: update Go version to 1.25.12 2026-07-20 17:56:44 +00:00
main.go update packages and go version 2025-01-24 17:02:52 +00:00
README.md update packages and go version 2025-01-24 17:02:52 +00:00

proto-gen-go

Docker

This tool is a thin wrapper around protoc, the protocol compiler. It makes it easy to reliably generate and update Go definitions for messages and services defined in .proto files. It uses a docker container with explicitly versioned dependencies to ensure maximum reproducibility and minimum side effects.

In your Go project's proto directory, add a gen.go file with the following contents:

package proto
//go:generate sh -c "go run github.com/github/proto-gen-go@<version> [flags] [--] [protoc flags] [proto files]"

(The go run module@version command requires Go 1.23 or later.)

Now, when you run go generate in your proto directory, the script will re-run the protocol compiler on all .proto files, and generate go files into the obvious relative locations. Commit them along with your source code.