protoc-gen-go(1)

protoc-gen-go1

Go compiler output filter for the protocol buffer compiler

Usage

protoc

protoc --plugin=protoc-gen-go=/usr/bin/protoc-gen-go --go_out=gocode input.proto

protoc

protoc --go_out=gocode input.proto

Overview

protoc-gen-go is a filter for the protoc(1) protocol buffer compiler. It takes the protocol buffer format from protoc(1) as input and produces Go code as output which can then be used to encode (marshal) and decode (unmarshal) data in the protocol buffer format specified in its input. The input is typically produced by protoc(1) by taking a .proto input file and converting it to a protocol buffer descriptor format which protoc-gen-go can then read. If protoc-gen-go can be found in the regular search path, the --plugin flag can be omitted.

Options

protoc-gen-go itself doesn't like options. All input is taken from stdin. If you use the protobuf compiler to invoke protoc-gen-go, see protoc(1) for a detailed list of all options.

Releases

Unchanged in 4 releases since Debian 8 (Jessie).

  1. 8–11

Author

protoc-gen-go was mostly written by Rob Pike and David Symonds for The Go Authors.

Reporting bugs

Please file any bug in the bug tracker at https://code.google.com/p/goprotobuf/issues/list

From golang-goprotobuf-dev 1.3.4-2+b6 in Debian 11 (Bullseye). Parsed by carta from the page's man source.