Merge pull request #37 from ferhatelmas/drop-for

drop for loop in favor of append
This commit is contained in:
Brad Rydzewski 2019-04-13 08:12:45 -07:00 committed by GitHub
commit 65ef1df51d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,9 +20,7 @@ import "github.com/drone/drone-runtime/engine"
// of global registry credentials to the container. // of global registry credentials to the container.
func WithAuths(auths []*engine.DockerAuth) func(*engine.Spec) { func WithAuths(auths []*engine.DockerAuth) func(*engine.Spec) {
return func(spec *engine.Spec) { return func(spec *engine.Spec) {
for _, auth := range auths { spec.Docker.Auths = append(spec.Docker.Auths, auths...)
spec.Docker.Auths = append(spec.Docker.Auths, auth)
}
} }
} }