drone-yaml/yaml/compiler/transform/combine.go
2019-01-22 15:44:17 -08:00

14 lines
295 B
Go

package transform
import "github.com/drone/drone-runtime/engine"
// Combine is a transform function that combines
// one or many transform functions.
func Combine(fns ...func(*engine.Spec)) func(*engine.Spec) {
return func(spec *engine.Spec) {
for _, fn := range fns {
fn(spec)
}
}
}