mirror of
https://github.com/chai2010/advanced-go-programming-book.git
synced 2025-05-24 12:32:21 +00:00
ch4-02-fix typo
This commit is contained in:
parent
841c1f094b
commit
4f5d73b696
@ -70,7 +70,7 @@ func (p *HelloService) Hello(request *String, reply *String) error {
|
||||
}
|
||||
```
|
||||
|
||||
其中Hello方法的输入参数和返回的参数均该用Protobuf定义的String类型表示。因为新的输入参数为结构体类型,因此该用指针类型作为输入参数,函数的内部代码同时也做了相应的调整。
|
||||
其中Hello方法的输入参数和输出的参数均该用Protobuf定义的String类型表示。因为新的输入参数为结构体类型,因此该用指针类型作为输入参数,函数的内部代码同时也做了相应的调整。
|
||||
|
||||
至此,我们初步实现了Protobuf和RPC组合工作。在启动RPC服务时,我们依然可以选择默认的gob或手工指定json编码,甚至可以重新基于protobuf编码实现一个插件。虽然做了这么多工作,但是似乎并没有看到什么收益!
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user