1
0
mirror of https://github.com/go-kratos/kratos.git synced 2025-03-27 21:49:08 +02:00

Update endpoint.go (#2012)

This commit is contained in:
songzhibin97 2022-05-20 22:36:54 +08:00 committed by GitHub
parent 2ee49311c1
commit c412d65f57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,10 +21,8 @@ func ParseEndpoint(endpoints []string, scheme string, isSecure bool) (string, er
if err != nil {
return "", err
}
if u.Scheme == scheme {
if IsSecure(u) == isSecure {
return u.Host, nil
}
if u.Scheme == scheme && IsSecure(u) == isSecure {
return u.Host, nil
}
}
return "", nil