protobuf README

The project's README from github.com/golang/protobuf. As one markdown file: README.md.

Go support for Protocol Buffers

GoDev Build Status

This module (github.com/golang/protobuf) contains Go bindings for protocol buffers.

It has been superseded by the google.golang.org/protobuf module, which contains an updated and simplified API, support for protobuf reflection, and many other improvements. We recommend that new code use the google.golang.org/protobuf module.

Versions v1.4 and later of github.com/golang/protobuf are implemented in terms of google.golang.org/protobuf. Programs which use both modules must use at least version v1.4 of this one.

See the developer guide for protocol buffers in Go for a general guide for how to get started using protobufs in Go.

See release note documentation for more information about individual releases of this project.

See documentation for the next major revision for more information about the purpose, usage, and history of this project.

Package index

Summary of the packages provided by this module:

Reporting issues

The issue tracker for this project is located here.

Please report any issues with a sufficient description of the bug or feature request. Bug reports should ideally be accompanied by a minimal reproduction of the issue. Irreproducible bugs are difficult to diagnose and fix (and likely to be closed after some period of time). Bug reports must specify the version of the Go protocol buffer module and also the version of the protocol buffer toolchain being used.

Contributing

This project is open-source and accepts contributions. See the contribution guide for more information.

Compatibility

This module and the generated code are expected to be stable over time. However, we reserve the right to make breaking changes without notice for the following reasons:

Any breaking changes outside of these will be announced 6 months in advance to [email protected].

protobuf (golang/protobuf)

Searching Database…

10.1K ·GitHub
What is this?Go bindings for Google's protocol buffers: the github.com/golang/protobuf module for serializing protobuf messages in Go, plus a protoc plugin that generates Go code from .proto files.
Is it a library I import or a tool I run?Both. You import Go packages (proto, jsonpb, ptypes) in your code, and separately run protoc-gen-go, a binary plugin for the protoc compiler, to generate your Go message packages.
How do I turn .proto files into Go code?Run the protoc compiler with the protoc-gen-go plugin; it generates a Go protocol buffer package from your .proto definitions. The README links a developer guide for getting started with protobufs in Go.
The README says this module is superseded — should I still use it?Not for new code: the README recommends google.golang.org/protobuf, which has an updated, simplified API, protobuf reflection and many other improvements. This module lives on for code that already imports it.
If I build on this module, how stable is its API?The module and generated code are expected to stay stable, but the team reserves the right to break compatibility without notice for security fixes, specification changes, bug fixes and internal changes; other breaking changes are announced 6 months in advance.
My codebase imports both this module and the newer one — anything to watch out for?Yes: programs using both modules must use at least version v1.4 of github.com/golang/protobuf, since v1.4 and later are implemented in terms of google.golang.org/protobuf.
What can it do with my messages besides binary serialization?The proto package also clones, merges and checks equality of messages and writes a text format, while jsonpb serializes protobuf messages as JSON.
Which well-known protobuf types come with helper packages?ptypes ships helpers for timestamp, duration, empty, any, wrappers and struct (structpb) — the standard google/protobuf well-known types.
Creator
golang
Size
8.2 MB
Stars
10.1K
Age
11y
Commits · 90 Days