protobuf: Files | Directories

Command protoc-gen-go

protoc-gen-go is a plugin for the Google protocol buffer compiler to generate Go code. Run it by building this program and putting it in your path with the name


That word 'go' at the end becomes part of the option string set for the protocol compiler, so once the protocol compiler (protoc) is installed you can run

protoc --go_out=output_directory input_directory/file.proto

to generate Go bindings for the protocol defined by file.proto. With that input, the output will be written to


The generated code is documented in the package comment for the library.

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

Package Files

link_grpc.go main.go


generatorThe code generator for the plugin for the Google protocol buffer compiler.
generator/internal/remapPackage remap handles tracking the locations of Go tokens in a source text across a rewrite by the Go formatter.
grpcPackage grpc outputs gRPC service descriptions in Go code.
pluginPackage plugin_go is a generated protocol buffer package.

Package main imports 5 packages (graph). Updated 2020-02-16. Refresh now. Tools for package owners.