- Building Microservices with Go
- Nic Jackson
- 80字
- 2021-07-15 17:28:14
Gob
We have already looked at gob in the previous chapter but as a quick re-cap, the gob format was specifically designed to facilitate Go to Go-based communication and was structured around the idea of something easier to use and possibly more efficient than the likes of protocol buffers, this comes at a cost of cross-language communication.
gob object definition:
type HelloWorldRequest struct {
Name string
}
More information about gob can be found in the Go documentation at https://golang.org/pkg/encoding/gob/