harness-drone/operator/runner/secrets.go

16 lines
398 B
Go
Raw Normal View History

2019-02-19 23:56:41 +00:00
// Copyright 2019 Drone.IO Inc. All rights reserved.
// Use of this source code is governed by the Drone Non-Commercial License
// that can be found in the LICENSE file.
package runner
import "github.com/drone/drone/core"
func toSecretMap(secrets []*core.Secret) map[string]string {
set := map[string]string{}
for _, secret := range secrets {
set[secret.Name] = secret.Data
}
return set
}