mirror of
https://github.com/containrrr/watchtower.git
synced 2025-12-21 01:20:12 +01:00
unite trust.ParseServerAddress & helpers.NormalizeRegistry
This commit is contained in:
parent
f0e075c390
commit
85f5c1fdb1
8 changed files with 46 additions and 95 deletions
|
|
@ -177,9 +177,7 @@ func GetScopeFromImageName(img, svc string) string {
|
|||
|
||||
// GetChallengeURL creates a URL object based on the image info
|
||||
func GetChallengeURL(img string) (url.URL, error) {
|
||||
|
||||
normalizedNamed, _ := reference.ParseNormalizedNamed(img)
|
||||
host, err := helpers.NormalizeRegistry(normalizedNamed.String())
|
||||
host, err := helpers.GetRegistryAddress(img)
|
||||
if err != nil {
|
||||
return url.URL{}, err
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue