Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

here's some compile errors #40

Open
njnuwjq opened this issue Mar 2, 2021 · 1 comment
Open

here's some compile errors #40

njnuwjq opened this issue Mar 2, 2021 · 1 comment

Comments

@njnuwjq
Copy link

njnuwjq commented Mar 2, 2021

follow the example bookstore, and some error occurs

admindeMacBook-Pro-7:add admin$ pwd
/Users/admin/goProj/bookstore/rpc/add

go 1.15

require (
github.com/golang/protobuf v1.4.3
github.com/tal-tech/go-zero v1.1.4
google.golang.org/grpc v1.36.0
google.golang.org/protobuf v1.25.0
)

admindeMacBook-Pro-7:add admin$ go run .

go.etcd.io/etcd/clientv3/balancer/picker

../../../../go/pkg/mod/go.etcd.io/[email protected]/clientv3/balancer/picker/err.go:25:9: cannot use &errPicker literal (type *errPicker) as type Picker in return argument:
*errPicker does not implement Picker (wrong type for Pick method)
have Pick(context.Context, balancer.PickInfo) (balancer.SubConn, func(balancer.DoneInfo), error)
want Pick(balancer.PickInfo) (balancer.PickResult, error)
../../../../go/pkg/mod/go.etcd.io/[email protected]/clientv3/balancer/picker/roundrobin_balanced.go:33:9: cannot use &rrBalanced literal (type *rrBalanced) as type Picker in return argument:
*rrBalanced does not implement Picker (wrong type for Pick method)
have Pick(context.Context, balancer.PickInfo) (balancer.SubConn, func(balancer.DoneInfo), error)
want Pick(balancer.PickInfo) (balancer.PickResult, error)

github.com/tal-tech/go-zero/zrpc/internal/balancer/p2c

../../../../go/pkg/mod/github.com/tal-tech/[email protected]/zrpc/internal/balancer/p2c/p2c.go:41:32: not enough arguments in call to base.NewBalancerBuilder
have (string, *p2cPickerBuilder)
want (string, base.PickerBuilder, base.Config)
../../../../go/pkg/mod/github.com/tal-tech/[email protected]/zrpc/internal/balancer/p2c/p2c.go:58:9: cannot use &p2cPicker literal (type *p2cPicker) as type balancer.Picker in return argument:
*p2cPicker does not implement balancer.Picker (wrong type for Pick method)
have Pick(context.Context, balancer.PickInfo) (balancer.SubConn, func(balancer.DoneInfo), error)
want Pick(balancer.PickInfo) (balancer.PickResult, error)

@kesonan
Copy link
Collaborator

kesonan commented Mar 2, 2021

try to add replace google.golang.org/grpc => google.golang.org/grpc v1.29.1 in file go.mod

for more errors, please see the Chinese document https://zeromicro.github.io/go-zero/error.html, we will translate it into EN as soon as possible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants