Marshal/Unmarshal Protocol Buffers in Go: Difference between revisions
Jump to navigation
Jump to search
(Created page with "=Internal= * Protocol Buffer Concepts") |
|||
Line 1: | Line 1: | ||
=Internal= | =Internal= | ||
* [[Protocol_Buffer_Concepts#Protocol_Buffer_Go_Code_Examples|Protocol Buffer Concepts]] | * [[Protocol_Buffer_Concepts#Protocol_Buffer_Go_Code_Examples|Protocol Buffer Concepts]] | ||
=Overview= | |||
This example uses this message definition: | |||
<syntaxhighlight lang='protobuf'> | |||
message SomeMessage { | |||
int32 id = 1; | |||
bool is_valid = 2; | |||
string name = 3; | |||
repeated string sample_list = 4; | |||
} | |||
</syntaxhighlight> | |||
The Go code is generated following the instructions from: {{Internal|Protocol_Buffers_Data_Type_Go_Code_Generation#Overview|Protocol Buffers Go Code Generation}} | |||
=Marshaling and Unmarshaling= | |||
<syntaxhighlight lang='go'> | |||
</syntaxhighlight> |
Revision as of 22:41, 8 May 2024
Internal
Overview
This example uses this message definition:
message SomeMessage {
int32 id = 1;
bool is_valid = 2;
string name = 3;
repeated string sample_list = 4;
}
The Go code is generated following the instructions from: