mirror of
https://github.com/jenkinsci/kubernetes-operator.git
synced 2026-10-04 23:21:11 +02:00
Initial version of user reconciliation loop and seed jobs
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
package render
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"text/template"
|
||||
)
|
||||
|
||||
// Render executes a parsed template (go-template) with configuration from data
|
||||
func Render(template *template.Template, data interface{}) (string, error) {
|
||||
var buffer bytes.Buffer
|
||||
if err := template.Execute(&buffer, data); err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
return buffer.String(), nil
|
||||
}
|
||||
Reference in New Issue
Block a user