1
0
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:
Sebastiaan van Stijn
2023-05-27 12:59:13 +02:00
parent 7ce5629658
commit 9817a23b17
6 changed files with 15 additions and 13 deletions
+3 -3
View File
@@ -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
}