这个项目:https://github.com/smallnest/rpcx
下面文档中说:
install the basic features:
```
go get -u -v github.com/smallnest/rpcx/...
```
If you want to use reuseport、quic、kcp, zookeeper, etcd, consul registry, use those tags to go get 、 go build or go run. For example, if you want to use all features, you can:
```
go get -u -v -tags "reuseport quic kcp zookeeper etcd consul ping" github.com/smallnest/rpcx/...
```
最初是使用了
```
go get -u -v github.com/smallnest/rpcx/...
```
后来发现需要consul功能,就用了
```
go get -u -v -tags "reuseport quic kcp zookeeper etcd consul ping" github.com/smallnest/rpcx/...
```
发现consul这个标签里的方法还是找不到,而consul_discovery.go文件也在,但是就是调用不到里面的NewConsulDiscovery方法。
你们遇到过吗?这是怎么回事?
有疑问加站长微信联系(非本文作者)