1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2025-01-23 17:53:23 +02:00
2014-10-12 13:02:53 -07:00

17 lines
264 B
Go

package script
import (
"strings"
)
func Inject(script string, params map[string]string) string {
if params == nil {
return script
}
injected := script
for k, v := range params {
injected = strings.Replace(injected, "$$"+k, v, -1)
}
return injected
}