Protobuf in Go

suggest change

Introduction

Protobuf, or Protocol Buffers, encodes and decodes structured data so that programs written in different languages can exchange messages. The generated code serializes a message to a compact binary form and decodes that form at the other end.

Remarks

There are two steps to using protobuf.

  1. Compile the protocol buffer definitions.
  2. Import the generated code, with the support library, into your program.

gRPC support

If a proto file specifies RPC services, generate the gRPC stubs with the separate protoc-gen-go-grpc plugin. The older plugins=grpc option on protoc-gen-go is no longer accepted:

$ protoc --go_out=. --go-grpc_out=. *.proto

Using Protobuf with Go

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents