1
0
mirror of https://github.com/docker/docker-credential-helpers.git synced 2026-06-13 16:01:28 +05:30

Style fixes - incorporates PR feedback

Signed-off-by: Emily Casey <ecasey@pivotal.io>
Signed-off-by: Danny Joyce <djoyce@pivotal.io>
This commit is contained in:
Emily Casey
2019-04-29 10:51:04 -04:00
committed by Danny Joyce
parent a3c1b5b757
commit 77e30bd9dd
+2 -3
View File
@@ -72,12 +72,11 @@ func getTarget(serverURL string) (string, error) {
return "", err return "", err
} }
targets := make([]string, 0) var targets []string
for i := range creds { for i := range creds {
attrs := creds[i].Attributes attrs := creds[i].Attributes
for _, attr := range attrs { for _, attr := range attrs {
if strings.Compare(attr.Keyword, "label") == 0 && if attr.Keyword == "label" && bytes.Equal(attr.Value, []byte(credentials.CredsLabel)) {
bytes.Compare(attr.Value, []byte(credentials.CredsLabel)) == 0 {
targets = append(targets, creds[i].TargetName) targets = append(targets, creds[i].TargetName)
} }
} }