Skip to content

Latest commit

 

History

History
47 lines (28 loc) · 1.44 KB

README.md

File metadata and controls

47 lines (28 loc) · 1.44 KB

I just want to say sorry

This is a proof-of-concept

Peptide is an anti-homage to amino the now defunct semi-protobuf-compatible library (https://github.com/tendermint/go-amino) (thanks for all the fish amino :) ).

This aims to provide support for custom types with the Google Go Protobuf V2 API (https://github.com/protocolbuffers/protobuf-go)

Following the approach suggested protobuf-go maintainer here: xen0n/protobuf-gogogo#1

Theft

I have borrowed the implementations provided by @xen0n (see: gogo/protobuf#691) for the gogoproto extensions listed below:

I took the time to re-implement the top 3 extensions needed by our projects, in the form of protobuf-gogogo (pardon the name). Note this is very preliminary work without testing infrastructure set up, don't use in (your) production yet.

The extensions implemented:

  • gogoproto.moretags
  • gogoproto.jsontag
  • gogoproto.enumvalue_customname

Test

Run:

./test.bash

Perhaps some tea?

Extensions

To test additional extensions add a .proto file to testdata

Then run:

./regenerate.bash

Then ./test.bash again to see if the .pb.go files compile. If they compile they are probably fine and should be shipped.

Credits