December 2017
Intermediate to advanced
316 pages
6h 58m
English
The types we assigned to the fields in the networkInterface message are scalar types. These types are similar to Go types and exactly match with them. For other programming languages, they will be converted to the respective types. A protobuf is designed keeping Go in mind, so the majority of types such as int, int32, int64, string, and bool are exactly the same, but a few vary. They are:
| Go type | Protobuf type |
| float32 | float |
| float64 | double |
| uint32 | fixed32 |
| uint64 | fixed64 |
| []byte | bytes |
These things should be kept in mind while defining messages in protbuf files. Apart from that, we are free to use other Go types as normal scalar types. Default values are the values that will be filled with those types if the user ...