zero-contrib
zero-contrib copied to clipboard
builder.go:20:65: cannot use url.Endpoint (value of type func() string) as type string in array or slice literal
在拉取外部包编译项目时报错 A clear and concise description of what the bug is. 在/zrcc/registry/consul/builder.go中的20行 To Reproduce Steps to reproduce the behavior, if applicable:
-
The code is
```dsn := strings.Join([]string{schemeName + ":/", url.Authority, url.Endpoint}, "/") -
The error is
url.Endpoint调用会导致cannot use url.Endpoint (value of type func() string) as type string in array or slice literal错误 应该将url.Endpoint 改为 url.Endpoint()方法调用
Expected behavior A clear and concise description of what you expected to happen.
Screenshots

Environments (please complete the following information):
- OS: [e.g. Linux]
- go-zero version [e.g. 1.2.1]
- goctl version [e.g. 1.2.1, optional]
More description Add any other context about the problem here.
引用的包不是最新的? go get -u在试试
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
The referenced package is not up to date? go get -u trying it now