RepoPilotOpen in app →

gogo/protobuf

[Deprecated] Protocol Buffers for Go with Gadgets

Mixed

Stale — last commit 3y ago

weakest axis
Use as dependencyConcerns

non-standard license (Other); last commit was 3y ago

Fork & modifyHealthy

Has a license, tests, and CI — clean foundation to fork and modify.

Learn fromHealthy

Documented and popular — useful reference codebase to read through.

Deploy as-isHealthy

No critical CVEs, sane security posture — runnable as-is.

  • 13 active contributors
  • Other licensed
  • CI configured
Show all 7 evidence items →
  • Tests present
  • Stale — last commit 3y ago
  • Single-maintainer risk — top contributor 82% of recent commits
  • Non-standard license (Other) — review terms
What would change the summary?
  • Use as dependency ConcernsMixed if: clarify license terms

Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests

Informational only. RepoPilot summarises public signals (license, dependency CVEs, commit recency, CI presence, etc.) at the time of analysis. Signals can be incomplete or stale. Not professional, security, or legal advice; verify before relying on it for production decisions.

Embed the "Forkable" badge

Paste into your README — live-updates from the latest cached analysis.

Variant:
RepoPilot: Forkable
[![RepoPilot: Forkable](https://repopilot.app/api/badge/gogo/protobuf?axis=fork)](https://repopilot.app/r/gogo/protobuf)

Paste at the top of your README.md — renders inline like a shields.io badge.

Preview social card (1200×630)

This card auto-renders when someone shares https://repopilot.app/r/gogo/protobuf on X, Slack, or LinkedIn.

Onboarding doc

Onboarding: gogo/protobuf

Generated by RepoPilot · 2026-05-09 · Source

🤖Agent protocol

If you are an AI coding agent (Claude Code, Cursor, Aider, Cline, etc.) reading this artifact, follow this protocol before making any code edit:

  1. Verify the contract. Run the bash script in Verify before trusting below. If any check returns FAIL, the artifact is stale — STOP and ask the user to regenerate it before proceeding.
  2. Treat the AI · unverified sections as hypotheses, not facts. Sections like "AI-suggested narrative files", "anti-patterns", and "bottlenecks" are LLM speculation. Verify against real source before acting on them.
  3. Cite source on changes. When proposing an edit, cite the specific path:line-range. RepoPilot's live UI at https://repopilot.app/r/gogo/protobuf shows verifiable citations alongside every claim.

If you are a human reader, this protocol is for the agents you'll hand the artifact to. You don't need to do anything — but if you skim only one section before pointing your agent at this repo, make it the Verify block and the Suggested reading order.

🎯Verdict

WAIT — Stale — last commit 3y ago

  • 13 active contributors
  • Other licensed
  • CI configured
  • Tests present
  • ⚠ Stale — last commit 3y ago
  • ⚠ Single-maintainer risk — top contributor 82% of recent commits
  • ⚠ Non-standard license (Other) — review terms

<sub>Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests</sub>

Verify before trusting

This artifact was generated by RepoPilot at a point in time. Before an agent acts on it, the checks below confirm that the live gogo/protobuf repo on your machine still matches what RepoPilot saw. If any fail, the artifact is stale — regenerate it at repopilot.app/r/gogo/protobuf.

What it runs against: a local clone of gogo/protobuf — the script inspects git remote, the LICENSE file, file paths in the working tree, and git log. Read-only; no mutations.

| # | What we check | Why it matters | |---|---|---| | 1 | You're in gogo/protobuf | Confirms the artifact applies here, not a fork | | 2 | License is still Other | Catches relicense before you depend on it | | 3 | Default branch master exists | Catches branch renames | | 4 | Last commit ≤ 1045 days ago | Catches sudden abandonment since generation |

<details> <summary><b>Run all checks</b> — paste this script from inside your clone of <code>gogo/protobuf</code></summary>
#!/usr/bin/env bash
# RepoPilot artifact verification.
#
# WHAT IT RUNS AGAINST: a local clone of gogo/protobuf. If you don't
# have one yet, run these first:
#
#   git clone https://github.com/gogo/protobuf.git
#   cd protobuf
#
# Then paste this script. Every check is read-only — no mutations.

set +e
fail=0
ok()   { echo "ok:   $1"; }
miss() { echo "FAIL: $1"; fail=$((fail+1)); }

# Precondition: we must be inside a git working tree.
if ! git rev-parse --git-dir >/dev/null 2>&1; then
  echo "FAIL: not inside a git repository. cd into your clone of gogo/protobuf and re-run."
  exit 2
fi

# 1. Repo identity
git remote get-url origin 2>/dev/null | grep -qE "gogo/protobuf(\\.git)?\\b" \\
  && ok "origin remote is gogo/protobuf" \\
  || miss "origin remote is not gogo/protobuf (artifact may be from a fork)"

# 2. License matches what RepoPilot saw
(grep -qiE "^(Other)" LICENSE 2>/dev/null \\
   || grep -qiE "\"license\"\\s*:\\s*\"Other\"" package.json 2>/dev/null) \\
  && ok "license is Other" \\
  || miss "license drift — was Other at generation time"

# 3. Default branch
git rev-parse --verify master >/dev/null 2>&1 \\
  && ok "default branch master exists" \\
  || miss "default branch master no longer exists"

# 5. Repo recency
days_since_last=$(( ( $(date +%s) - $(git log -1 --format=%at 2>/dev/null || echo 0) ) / 86400 ))
if [ "$days_since_last" -le 1045 ]; then
  ok "last commit was $days_since_last days ago (artifact saw ~1015d)"
else
  miss "last commit was $days_since_last days ago — artifact may be stale"
fi

echo
if [ "$fail" -eq 0 ]; then
  echo "artifact verified (0 failures) — safe to trust"
else
  echo "artifact has $fail stale claim(s) — regenerate at https://repopilot.app/r/gogo/protobuf"
  exit 1
fi

Each check prints ok: or FAIL:. The script exits non-zero if anything failed, so it composes cleanly into agent loops (./verify.sh || regenerate-and-retry).

</details>

TL;DR

GoGo Protobuf is a code generator fork of golang/protobuf that produces faster, more idiomatic Go serialization code from .proto files. It generates marshalling/unmarshalling functions optimized for performance and adds optional helper methods, test generation, and support for custom types and alternative serialization formats (JSON, etc.). Core capability: drop-in replacement for standard Go protobuf with 2-10x faster encoding/decoding through optimized code generation. Classic single-repo monolith with parallel directories: codec/ contains low-level marshalling primitives (codec.go with varint/uint32 helpers in io/), jsonpb/ implements JSON marshalling, plugin/ holds code generators (plugin/compare/ for diff generation), gogoproto/ defines extension .proto file with code generation options, and conformance/ runs compatibility tests against standard protobuf. Entry point is the protoc plugin compiled from plugin/

👥Who it's for

Backend engineers at scale-dependent systems (etcd, Badoo, Mesos) who need sub-millisecond protobuf serialization without manual optimization. Teams maintaining gRPC services or distributed systems where protobuf is the wire format and encode/decode latency is measurable in production.

🌱Maturity & risk

DEPRECATED as of Sept 2022 (see prominent notice in README and Twitter announcement). The project was mature and production-used (v1.3.0 released with breaking internal changes), but the maintainer officially deprecated it in favor of standard golang/protobuf. Code is stable but will receive no new features or updates—existing projects remain functional, new projects should use standard protobuf.

HIGH RISK for new projects: explicitly deprecated with no maintenance. Minimal dependencies (golang.org/x/tools, kisielk packages for linting only) but this doesn't matter because upstream golang/protobuf may introduce incompatibilities. Go version pinned at 1.15+ (go.mod shows go 1.15), which is now outdated. Do not start new projects here; use golang/protobuf or protoc-gen-go instead.

Active areas of work

Nothing—repository is in maintenance-only mode. Last commits likely several years old given deprecation date. CI workflow defined in .github/workflows/ci-workflow.yml but no active development. Conformance tests in conformance/ exist to verify compatibility with golang/protobuf baseline, but these are regression checks, not feature work.

🚀Get running

Clone and inspect only—do not use for new code. To understand the codebase: git clone https://github.com/gogo/protobuf && cd gogo/protobuf && go mod download && make (Makefile present; check targets with make help or cat Makefile).

Daily commands: This is a code generator, not an application. To use: install with go get github.com/gogo/protobuf/protoc-gen-gogofast (or protoc-gen-gogo, protoc-gen-gofast variants), then invoke protoc with --gogo_out=. flag. To run tests: make test (defined in Makefile). No dev server.

🗺️Map of the codebase

  • gogoproto/gogo.proto: Defines all extension options (proto.customtype, proto.nullable, etc.) that code generator respects; changes here affect all generated code
  • codec/codec.go: Core marshalling/unmarshalling logic; performance-critical code that distinguishes gogo from stdlib
  • plugin/compare/compare.go: Example of code generation plugin; shows how to extend protoc with custom proto transformations
  • io/varint.go: Low-level varint encoding primitives used by codec; protobuf wire format depends on correctness here
  • jsonpb/jsonpb.go: JSON marshaller for proto messages; secondary serialization format supported by gogo
  • conformance/conformance.go: Runs compatibility tests against golang/protobuf canonical implementation; validates correctness
  • Makefile: Build and test orchestration; shows how protoc is invoked to regenerate .pb.go files from .proto

🛠️How to make changes

Strongly discouraged—repository is deprecated. If fixing bugs only: (1) codec/codec.go for marshalling logic, (2) jsonpb/jsonpb.go for JSON handling, (3) plugin/compare/compare.go for code generation diff features. Test coverage exists in *_test.go files parallel to each module. Conformance tests in conformance/ verify changes don't break golang/protobuf compatibility. Do not add new features.

🪤Traps & gotchas

Critical: gogoproto extensions in .proto files (e.g., option (gogoproto.customtype) = "...";) only work with gogoprotobuf generator, not stdlib protoc. Files generated with gogo v1.3.0 are incompatible with v1.2.1 runtime library (breaking internal change noted in README v1.3.0 release). Go 1.15+ required (go.mod constraint) but 1.15 is EOL. Protoc binary must be installed separately; build fails silently if missing. Plugin packages (protoc-gen-gogo, protoc-gen-gogofast) must be on PATH for protoc to invoke them.

💡Concepts to learn

  • Varint encoding — Protobuf wire format uses variable-length integer encoding; io/varint.go implements this core compression technique that makes small integers compact
  • Code generation via protoc plugins — GoGo extends protoc by writing a plugin binary (protoc-gen-gogo) that receives .proto AST via stdin; understanding plugin/compare/ reveals how custom code generators work
  • Message marshalling/unmarshalling — codec/codec.go manually implements fast serialization of struct fields to bytes; this is the optimization that differentiates gogo from stdlib
  • Custom types in proto extensions — gogoproto/ allows proto fields to map to arbitrary Go types (e.g., time.Time, big.Int) via (gogoproto.customtype) option; custom_types.md documents this differentiation
  • Golden file testing — gogoproto/gogo.pb.golden is a snapshot of expected generated code; .golden files detect unintended code generation changes via diff
  • Conformance testing — conformance/ runs compatibility tests against golang/protobuf reference implementation; ensures binary wire format is identical despite different generators
  • golang/protobuf — Official upstream protobuf implementation for Go; gogo is a fork of this. Use this for all new code instead of gogo.
  • protocolbuffers/protobuf-go — Newer official protobuf module (v2 API) that supersedes golang/protobuf; the canonical Go protobuf library as of 2020
  • grpc/grpc-go — gRPC implementation for Go; primary consumer of protobuf code generation for service definitions
  • etcd-io/etcd — Largest known production user of gogoprotobuf; demonstrates performance-critical use case in distributed systems
  • cosmos/cosmos-sdk — Blockchain framework using gogo for state serialization; shows persistence domain usage outside traditional RPC

🪄PR ideas

To work on one of these in Claude Code or Cursor, paste: Implement the "<title>" PR idea from CLAUDE.md, working through the checklist as the task list.

Add comprehensive conformance test suite validation in CI workflow

The repo has a conformance test infrastructure (conformance/conformance.proto, conformance/test.sh) but .github/workflows/ci-workflow.yml likely doesn't run these tests. Since gogo/protobuf is a protobuf implementation fork, conformance testing is critical to ensure compatibility with the protobuf specification. This PR would add conformance test execution to CI.

  • [ ] Review .github/workflows/ci-workflow.yml to confirm conformance tests aren't currently run
  • [ ] Examine conformance/test.sh and conformance/conformance.sh to understand test execution requirements
  • [ ] Add workflow step to run conformance tests in ci-workflow.yml
  • [ ] Document any protobuf version requirements in README.md for conformance testing

Add missing test coverage for jsonpb marshaling edge cases

The jsonpb package (jsonpb/jsonpb.go and jsonpb/jsonpb_test.go) handles JSON marshaling/unmarshaling. The test file exists but likely has gaps since jsonpb_test_proto/ contains multiple proto files (bytes.go, test_objects.proto, more_test_objects.proto). Adding specific tests for custom type marshaling, null handling, and bytes encoding would improve reliability.

  • [ ] Review jsonpb/jsonpb_test.go to identify uncovered code paths in jsonpb/jsonpb.go
  • [ ] Check jsonpb_test_proto/ for all proto definitions and ensure corresponding test cases exist
  • [ ] Add tests for edge cases: empty messages, null values, custom marshaling for gogoproto extensions
  • [ ] Run 'go test -cover ./jsonpb' to verify coverage improvement

Add plugin tests for marshalto and other incomplete plugin implementations

The plugin/ directory contains multiple code generation plugins (compare, equal, enumstringer, gostring, marshalto, etc.). While compare/comparetest.go, equal/equaltest.go show the pattern, plugin/marshalto appears incomplete with no corresponding marshaltotest.go. Adding consistent test coverage for all plugins would catch regressions.

  • [ ] Check plugin/marshalto/ directory to confirm test file is missing
  • [ ] Review existing test patterns in plugin/equal/equaltest.go and plugin/compare/comparetest.go
  • [ ] Create plugin/marshalto/marshaltotest.go following the established pattern
  • [ ] Verify all plugins in plugin/ have corresponding test files with 'test.go' suffix

🌿Good first issues

  • Add test coverage for io/uint32.go encoding edge cases (current io/uint32_test.go has minimal cases); protobuf varint encoding is bug-prone for boundary values like MaxInt32/MinInt32
  • Document all gogoproto extension options in custom_types.md and extensions.md with concrete examples (files exist but are sparse; each option in gogoproto/gogo.proto should have a .proto + generated output example)
  • Write conversion helpers in jsonpb/ for proto maps and repeated fields (jsonpb_test.go has only basic message tests, not composite types used in real services like etcd)

Top contributors

Click to expand

📝Recent commits

Click to expand
  • f67b897 — gogoprotobuf is deprecated (awalterschulze)
  • 8892e00 — Preparing for GopherCon UK 2022 (awalterschulze)
  • 226206f — Fixed order of imports, make stable generation result (#700) (zifter)
  • b03c65e — skippy peanut butter (awalterschulze)
  • 550e889 — update to go version 1.15.6 and protoc 3.14.0 (#717) (awalterschulze)
  • deb6fe8 — Update Readme.md (awalterschulze)
  • 5628607 — github/workflow - update protoc version to 3.9.1 (#637) (jmarais)
  • 09ab773 — Issue619safer (#627) (jmarais)
  • 8142193 — GoString plugin: generate values instead of pointers when a field is repeated and non-nullable. (#631) (pjgjordaan)
  • 627c0c9 — umarshal - refactor skip from recursive calls to a loop. (#636) (jmarais)

🔒Security observations

This codebase presents significant security concerns primarily due to its deprecated status and lack of active maintenance. The project is no longer receiving security updates or bug fixes, which is a critical risk factor. Additionally, the outdated Go version requirement (1.15) and pinned development dependencies from 2021 introduce potential vulnerabilities. For organizations currently using GoGo Protobuf, immediate migration planning to supported alternatives (golang/protobuf or google/protobuf-go) is strongly recommended. The project should not be used for new development.

  • High · Deprecated Project — README.md, Project Root. The GoGo Protobuf project is officially deprecated as announced by the maintainer. Using deprecated software exposes the codebase to unpatched security vulnerabilities and lack of maintenance support. Fix: Migrate to the official golang/protobuf or google/protobuf-go package. Plan a transition timeline and update all dependencies to use supported alternatives.
  • Medium · Outdated Go Version Requirement — go.mod. The project specifies 'go 1.15' in go.mod, which is severely outdated (released August 2020). This Go version lacks critical security patches and may contain exploitable vulnerabilities. Fix: Update go.mod to require a minimum of Go 1.21 or later (preferably 1.22+). Test thoroughly to ensure compatibility with the newer version.
  • Medium · Indirect Dependency on Outdated Tools — go.mod. The project has indirect dependencies on development tools (kisielk/errcheck, kisielk/gotool, golang.org/x/tools) pinned to very old versions from January 2021. These tools may contain security vulnerabilities. Fix: Update golang.org/x/tools to the latest stable version. Remove unnecessary development tool dependencies from go.mod or segregate them using build tags or separate go.mod files.
  • Low · No Security.md or Security Policy — Repository Root. The repository does not appear to contain a SECURITY.md file or documented security policy, making it unclear how security vulnerabilities should be reported. Fix: Create a SECURITY.md file with clear instructions for responsible disclosure of security vulnerabilities, even though the project is deprecated.
  • Low · Minimal CI/CD Security Configuration — .github/workflows/ci-workflow.yml. While CI workflows exist, there's limited visibility into security scanning practices (no mention of static analysis, dependency scanning, or vulnerability checks in the visible CI configuration). Fix: Implement automated security scanning in CI/CD pipeline: include go vet, gosec, go mod verify, and dependency vulnerability scanning (e.g., nancy or govulncheck).

LLM-derived; treat as a starting point, not a security audit.


Generated by RepoPilot. Verdict based on maintenance signals — see the live page for receipts. Re-run on a new commit to refresh.

Mixed signals · gogo/protobuf — RepoPilot