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
|
||||
}
|
||||
|
||||
targets := make([]string, 0)
|
||||
var targets []string
|
||||
for i := range creds {
|
||||
attrs := creds[i].Attributes
|
||||
for _, attr := range attrs {
|
||||
if strings.Compare(attr.Keyword, "label") == 0 &&
|
||||
bytes.Compare(attr.Value, []byte(credentials.CredsLabel)) == 0 {
|
||||
if attr.Keyword == "label" && bytes.Equal(attr.Value, []byte(credentials.CredsLabel)) {
|
||||
targets = append(targets, creds[i].TargetName)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user