RPC生成错误

  • 问题

    1. # github.com/tal-tech/go-zero/zrpc/internal/balancer/p2c
    2. D:\Projects\Go\pkg\mod\github.com\tal-tech\go-zero@v1.1.10\zrpc\internal\balancer\p2c\p2c.go:57:9: cannot use &p2cPicker{...} (type *p2cPicker) as type balancer.Picker in return argument:
    3. *p2cPicker does not implement balancer.Picker (wrong type for Pick method)
    4. have Pick(balancer.PickInfo) (balancer.PickResult, error)
    5. want Pick(context.Context, balancer.PickInfo) (balancer.SubConn, func(balancer.DoneInfo), error)
    6. D:\Projects\Go\pkg\mod\github.com\tal-tech\go-zero@v1.1.10\zrpc\internal\balancer\p2c\p2c.go:65:32: too many arguments in call to base.NewBalancerBuilder
    7. have (string, *p2cPickerBuilder, base.Config)
    8. want (string, base.PickerBuilder)
  • 解决文案

D:\Projects\Github\NoobWu\zero-examples\go.mod
image.png