drop for loop in favor of append

This commit is contained in:
ferhat elmas 2019-04-13 16:45:41 +02:00
parent 68319d032e
commit d3271a5de6
1 changed files with 1 additions and 3 deletions

View File

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