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:
@@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user