macOS
brew install protoc-gen-golocal Homebrew formula metadata
安装
brew install protoc-gen-golocal Homebrew formula metadata
sudo apk add protoc-gen-goAlpine Linux edge package indexes · protoc-gen-go · 来源: dl-cdn.alpinelinux.org
sudo apt install protoc-gen-goDebian stable package indexes · protoc-gen-go · 来源: deb.debian.org
nix profile install nixpkgs#protoc-gen-gonixpkgs package indexes · pkgs/by-name/pr/protoc-gen-go/package.nix · 来源: api.github.com
sudo zypper install protoc-gen-goopenSUSE Tumbleweed package metadata · protoc-gen-go · 来源: download.opensuse.org
sudo dnf install golang-google-protobufFedora Rawhide package metadata · golang-google-protobuf · 来源: dl.fedoraproject.org
概览
Go support for Google's protocol buffers
历史
protoc-gen-go is the official Protocol Buffers compiler plugin for generating Go message types and supporting code from .proto schemas. It belongs to the google.golang.org/protobuf implementation and is distinct from the gRPC-specific Go generator.
Go's first Protocol Buffer bindings were announced in March 2010 and included both a protoc code-generation plugin and a Go runtime package.
On 2 March 2020, the Go team released google.golang.org/protobuf as APIv2, a major overhaul adding first-class protobuf reflection, dynamic messages, improved testing support, and a cleaned-up API surface. protoc-gen-go is the compiler plugin within that module.
On 16 December 2024, the Go team announced the Opaque generated-code API. The established Open Struct API remained supported, allowing users to migrate without an abrupt removal of existing generated-code behavior.
The Go protobuf bindings grew alongside Go from their initial pre-Go-1 form into a widely used serialization foundation. The 2020 APIv2 module allowed gradual adoption by making the older APIv1 module interoperate with the new implementation.
The generator is packaged across Homebrew and multiple Linux-oriented package managers in source_facts.package-manager, while upstream recommends installation with go install. It is routinely used by Go projects that exchange protobuf messages or combine message generation with gRPC service generation.
Install the plugin with go install, ensure it is on PATH, and invoke protoc with --go_out plus any --go_opt values. Each generated Go package needs an import path, usually supplied through the .proto file's go_package option; output placement can be import-path-based or source-relative. The tool uses command-line options and schema declarations rather than a documented persistent config or credentials file.
protoc-gen-go sits at the boundary between a language-neutral schema compiler and Go's module ecosystem. Generator version, runtime-library version, import-path mapping, and generated-code API selection can materially affect reproducibility and compatibility.
The 2020 APIv2 migration and the later Opaque API illustrate how a mature code generator can evolve representation and reflection behavior while retaining compatibility paths for existing generated code.
安全态势
narrow executable package without higher-risk signals.
绿色 风险 · 低 置信度 · appliance
在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。
可执行文件
| 命令 | 类型 | 暴露范围 | 备注 |
|---|---|---|---|
protoc-gen-go | cli | 全局可执行文件 |
新鲜度
这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。
https://github.com/protocolbuffers/protobuf-go
安装元数据
| 软件包键 | brew:protoc-gen-go |
|---|---|
| 版本 | 1.36.12 |
| 软件包管理器 | Homebrew |
| 软件包管理器页面 | https://formulae.brew.sh/formula/protoc-gen-go |
| 主页 | https://github.com/protocolbuffers/protobuf-go |
| 仓库 | https://github.com/protocolbuffers/protobuf-go |
| 许可证 | BSD-3-Clause |
| 源码归档 | https://github.com/protocolbuffers/protobuf-go/archive/refs/tags/v1.36.12.tar.gz |
| 最后更新 | 2026-09-13T09:40:44+02:00 |
| Pulse | updated |
| 依赖 | protobuf |
| 构建依赖 | go |
| Bottle | 可用 (于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux) |
| Homebrew post-install | 未定义 |
| 服务 | 未声明 |
注册表事实
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | protoc-gen-go |
| Version Scheme | 0 |
| Revision | 0 |
| Head Version | HEAD |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
源数据库匹配
匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。
protoc-gen-go 1.36.5-1
Go plugin for protobuf compiler (APIv2)
https://github.com/protocolbuffers/protobuf-go
sudo apt install protoc-gen-goprotoc-gen-go
nix profile install nixpkgs#protoc-gen-goprotoc-gen-go 1.32.0-1
Go plugin for protobuf compiler (APIv2)
https://github.com/protocolbuffers/protobuf-go
sudo apt install protoc-gen-goprotoc-gen-go 1.36.11-r6
Protocol Buffers Go generator
https://github.com/protocolbuffers/protobuf-go
sudo apk add protoc-gen-gogolang-google-protobuf 1.31.0-16.fc45
Go support for Google's protocol buffers
https://github.com/protocolbuffers/protobuf-go
sudo dnf install golang-google-protobufprotoc-gen-go 1.34.2-1.9
Go support for Google's protocol buffers
https://github.com/golang/protobuf
sudo zypper install protoc-gen-go来源线索
此页面由 av-web 从 scripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。
View the package source record on GitHub.