protobuf: Files | Directories

Command protoc-gen-go

protoc-gen-go is a plugin for the Google protocol buffer compiler to generate Go code. Install it by building this program and making it accessible within your PATH with the name:


The 'go' suffix becomes part of the argument for the protocol compiler, such that it can be invoked as:

protoc --go_out=paths=source_relative:. path/to/file.proto

This generates Go bindings for the protocol buffer defined by file.proto. With that input, the output will be written to:


See the README and documentation for protocol buffers to learn more:

Package Files



generatorPackage generator is deprecated.
generator/internal/remapPackage remap handles tracking the locations of Go tokens in a source text across a rewrite by the Go formatter.
grpcPackage grpc is deprecated.

Package main imports 6 packages (graph) and is imported by 1 packages. Updated 2020-08-21. Refresh now. Tools for package owners.