February 2020
Intermediate to advanced
404 pages
8h 42m
English
The types we assigned to the fields in the networkInterface message are scalar types. These types are similar to Go types and match with them. For other programming languages, they will be converted into their respective types. Protobufs support many diverse types, such as int, int32, int64, string, and bool, which resemble Go types, but with a few variations.
They are as follows:
| Go type | Protobuf type |
| float32 | float |
| float64 | double |
| uint32 | fixed32 |
| uint64 | fixed64 |
| []byte | bytes |
These types can be used while defining fields in a protobuf file. These fields and types in protobuf are converted into their respective Go variables and types upon being compiled. Go fills an unassigned variable with its empty value. Let's ...
Read now
Unlock full access