diff --git a/ch4-rpc/ch4-04-grpc.md b/ch4-rpc/ch4-04-grpc.md index a4741c8..f8e8604 100644 --- a/ch4-rpc/ch4-04-grpc.md +++ b/ch4-rpc/ch4-04-grpc.md @@ -315,9 +315,9 @@ func (p *PubsubService) Publish( func (p *PubsubService) Subscribe( arg *String, stream PubsubService_SubscribeServer, ) error { - ch := p.Subscribe(func(v interface{}) bool { + ch := p.pub.SubscribeTopic(func(v interface{}) bool { if key, ok := v.(string); ok { - if strings.Hasprefix(arg.GetValue()) { + if strings.HasPrefix(key,arg.GetValue()) { return true } }