My standard protobuf library, google/protobuf, and googleapis for golang/protobuf and gogo/protobuf
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
etc
go
gogo
proto
testing
GOGO_PROTOBUF_LICENSE
GOLANG_PROTOBUF_LICENSE
GOOGLE_PROTOBUF_LICENSE
LICENSE
Makefile
README.md
circle.yml

README.md

CircleCI Go Report Card GoDoc GoDoc MIT License

pb

Compiled well-known types from google/protobuf, compiled types from googleapis, and my protocol buffer standard library.

Compiled for both golang/protobuf and gogo/protobuf.

Types handled in github.com/golang/protobuf/ptypes and github.com/gogo/protobuf/types are not compiled.

Successor to go.pedge.io/google-protobuf and go.pedge.io/googleapis, plus the extra protos in proto/pb, and lots more fun from generated code in etc/tmpl. Specifically check out the geo and money packages.

Using

You need to put the proto directory on protoc's import path:

protoc -I /path/to/go/src/go.pedge.io/pb/proto ...

protoeasy will directly import all proto files from the proto directory to compile against unless otherwise specified, so for example to use proto/pb/money/money.proto, just do:

import "pb/money/money".proto

If using golang/protobuf, use the go directory. If using gogo/protobuf, use the gogo directory. Both directories have the same structure and same code, just different protocol buffer library.

There is additional code that is not generated by the plugins in a few packages, check out etc/tmpl and it should make sense where it is.

Exceptions

Use these packages instead for the protos inside these files:

  • google/api/annotations.proto: github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis/google/api
  • google/api/http.proto: github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis/google/api

golang/protobuf

  • google/protobuf/descriptor.proto: github.com/golang/protobuf/protoc-gen-go/descriptor

gogo/protobuf

  • google/protobuf/descriptor.proto: github.com/gogo/protobuf/protoc-gen-gogo/descriptor