Documentation ¶
Overview ¶
This package just provides default config for the external yaml library.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InjectTemplatePipeline ¶
func InjectTemplatePipeline(initialValue, writeTo, values interface{}) error
InjectTemplateValues is a convenience func that takes an initial value, a destination value pointer, and a pipeline value, and converts the initialValue to a YAML template, then renders it using the provided pipeline value, and finally unmarshals it to the writeTo pointer. A typical invocation may look like this:
err := InjectTemplatePipeline(v, &v, map[string]string{"hello":"world"})
Note that in the above invocation the source value v is mutated, since it is passed in as the initial value, and then a pointer to it is passed in as the second value. This is a common pattern, but is optional, you can use two unrelated values if you want to preserve the initial value of v.
Types ¶
type RenderedYAML ¶
func (*RenderedYAML) String ¶
func (y *RenderedYAML) String() string
func (*RenderedYAML) Unmarshal ¶
func (t *RenderedYAML) Unmarshal(v interface{}) error
type Template ¶
func NewTemplateFromValue ¶
func (*Template) SetPipeline ¶
func (t *Template) SetPipeline(a interface{}) *TemplateWithPipeline
type TemplateWithPipeline ¶
func (*TemplateWithPipeline) Render ¶
func (t *TemplateWithPipeline) Render() *RenderedYAML