drone-yaml/yaml/compiler/transform/combine.go

14 lines
295 B
Go
Raw Normal View History

2019-01-22 23:44:17 +00:00
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)
}
}
}