Skip to Content
Building RESTful Web services with Go
book

Building RESTful Web services with Go

by Naren Yellavula
December 2017
Intermediate to advanced
316 pages
6h 58m
English
Packt Publishing
Content preview from Building RESTful Web services with Go

Scalar values

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 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Hands-On RESTful Web Services with Go - Second Edition

Hands-On RESTful Web Services with Go - Second Edition

Naren Yellavula
Microservices with Go

Microservices with Go

Alexander Shuiskov

Publisher Resources

ISBN: 9781788294287Supplemental Content