Protocol Buffers Data Type Go Code Generation: Difference between revisions
Jump to navigation
Jump to search
Line 6: | Line 6: | ||
=Overview= | =Overview= | ||
The code that supports the data types defined in the <code>.proto</code> files | The Go code that supports the data types defined in the <code>.proto</code> files is generated withe the compiler is invoked with the <code>go_out</code> flag, and the Go plugin is [[#Installation|installed]]. | ||
<syntaxhighlight lang='bash'> | <syntaxhighlight lang='bash'> |
Revision as of 15:55, 7 May 2024
External
https://protobuf.dev/reference/go/go-generated
Internal
Overview
The Go code that supports the data types defined in the .proto
files is generated withe the compiler is invoked with the go_out
flag, and the Go plugin is installed.
Installation
The generic compiler must be installed with TODO.
To generate Go code, the Go plugin must be installed with:
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
This will install a protoc-gen-go
binary in ${GOBIN}
.