zeromicro / zero-contrib

A collection of extensions and tools for go-zero.
184 stars 77 forks source link

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 1 year ago

Adil-ly commented 1 year ago

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

More description Add any other context about the problem here.

MaxToby commented 1 year ago

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

Issues-translate-bot commented 1 year ago

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

github-actions[bot] commented 2 weeks ago

This issue is stale because it has been open for 30 days with no activity.