mirror of
https://github.com/docker/docker-credential-helpers.git
synced 2026-06-13 16:01:28 +05:30
format code with gofumpt
Doing a one-pass of formatting the code with gofumpt, which provides a superset of gofmt. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -111,15 +111,15 @@ func exactMatch(serverURL, target url.URL) bool {
|
||||
}
|
||||
|
||||
func approximateMatch(serverURL, target url.URL) bool {
|
||||
//if scheme is missing assume it is the same as target
|
||||
// if scheme is missing assume it is the same as target
|
||||
if serverURL.Scheme == "" {
|
||||
serverURL.Scheme = target.Scheme
|
||||
}
|
||||
//if port is missing assume it is the same as target
|
||||
// if port is missing assume it is the same as target
|
||||
if serverURL.Port() == "" && target.Port() != "" {
|
||||
serverURL.Host = serverURL.Host + ":" + target.Port()
|
||||
}
|
||||
//if path is missing assume it is the same as target
|
||||
// if path is missing assume it is the same as target
|
||||
if serverURL.Path == "" {
|
||||
serverURL.Path = target.Path
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user