diff options
Diffstat (limited to 'src/google/protobuf/any.proto')
-rw-r--r-- | src/google/protobuf/any.proto | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/google/protobuf/any.proto b/src/google/protobuf/any.proto index 9bd3f50a..c7486676 100644 --- a/src/google/protobuf/any.proto +++ b/src/google/protobuf/any.proto @@ -74,6 +74,16 @@ option objc_class_prefix = "GPB"; // any.Unpack(foo) // ... // +// Example 4: Pack and unpack a message in Go +// +// foo := &pb.Foo{...} +// any, err := ptypes.MarshalAny(foo) +// ... +// foo := &pb.Foo{} +// if err := ptypes.UnmarshalAny(any, foo); err != nil { +// ... +// } +// // The pack methods provided by protobuf library will by default use // 'type.googleapis.com/full.type.name' as the type URL and the unpack // methods only use the fully qualified type name after the last '/' |