protobuf-go/cmd/protoc-gen-go
Joe Tsai 0084168af8 types/known/anypb: add New constructor
While the MarshalFrom method and function are  more flexible since
it permits the reuse of an existing Any, the most common use case
by far is to construct a new Any. Optimize for that use case
by providing a constructor that directly returns a new Any instance.
We do not provide a variant that accepts a MarshalOptions since
the more flexible MarshalFrom function can be used for that.

Change-Id: Iab0219229c7d3aaa7390a2340a4f248002995293
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/237997
Reviewed-by: Damien Neil <dneil@google.com>
2020-06-16 00:35:17 +00:00
..
internal_gengo types/known/anypb: add New constructor 2020-06-16 00:35:17 +00:00
testdata internal/cmd/generate-protos: use module= generator option 2020-03-20 21:35:56 +00:00
annotation_test.go internal/genid: add new package for generated identifiers 2020-05-29 07:08:23 +00:00
main.go all: implement support for proto3 optional semantics 2020-04-29 20:02:24 +00:00