PROTOC-GEN-GO(1)
π PROTOC-GEN-GO(1) π
General Commands Manual Β· the protoc-gen-go page, bestie
okay so real talk, this is the manual for protoc-gen-go β a Go compiler output filter for the protocol buffer compiler. yes it's a whole thing. come sit with me π«Ά
β¨ NAME β¨
protoc-gen-go β Go compiler output filter for the protocol buffer compiler
π SYNOPSIS π
protoc --plugin=protoc-gen-go=/usr/bin/protoc-gen-go --go_out=gocode
input.proto
protoc --go_out=gocode input.proto
two ways to do the thing, pick your fighter π
π¦ DESCRIPTION π¦
so protoc-gen-go is a filter for the protoc(1) protocol buffer compiler. that's the whole job. it takes the protocol buffer format from protoc(1) as input, and it produces Go code as output β code you can then use to encode (<em>marshal</em>) and decode (<em>unmarshal</em>) data in the protocol buffer format that was specified in its input. it's giving translator but make it compilers β¨
the input is typically produced by protoc(1) β it grabs a .proto input file and converts it into a protocol buffer descriptor format, which protoc-gen-go can then read. little relay race, we love to see it πβοΈ
and here's the cute part: if protoc-gen-go can be found in the regular search path, you can just omit the --plugin flag. no cap. it'll find it. iykyk π
π OPTIONS π
ngl bestie, protoc-gen-go itself doesn't like options. like, at all. it takes all input from stdin, periodt. that's the vibe.
if you're using the protobuf compiler to invoke protoc-gen-go, then go look at protoc(1) for a detailed list of all options β that's where the real options live, not here π
π SEE ALSO π
that's it. that's the list. iconic minimalism honestly.
πΈ AUTHOR πΈ
protoc-gen-go was mostly written by Rob Pike and David Symonds for The Go Authors. legends fr fr π
π REPORTING BUGS π
found a bug? don't be shy, please file any bug in the bug tracker at:
https://code.google.com/p/goprotobuf/issues/list
they wanna hear about it, promise π«Ά
π COPYRIGHT π
Copyright Β© 2010-2013 The Go Authors. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- Neither the name of Google Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
yeah the all-caps part is scary but that's just how legal text dresses up, bestie. read it, don't fear it π
and that's the whole page!! this one's from the protoc-gen-go source, dated Aug 2013 β shoutout to the PROTOC-GEN-GO(1) era, still serving looks π
β¨
mwah, go write some protos π¦π
π¦ where this page comes from
- ubuntu jammy: golang-goprotobuf-dev 1.3.4-2 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms