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

builder.go:20:65: cannot use url.Endpoint (value of type func() string) as type string in array or slice literal #79

Open
Adil-ly opened this issue Mar 3, 2023 · 2 comments

Comments

@Adil-ly
Copy link

Adil-ly commented Mar 3, 2023

在拉取外部包编译项目时报错
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:

  1. The code is

    ```dsn := strings.Join([]string{schemeName + ":/", url.Authority, url.Endpoint}, "/")
  2. 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
image

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.

@MaxToby
Copy link
Collaborator

MaxToby commented Oct 30, 2023

引用的包不是最新的? go get -u在试试

@Issues-translate-bot
Copy link

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

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

3 participants