gotmpl

package
v0.14.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 2, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package gotmpl creates objects from ObjectTemplate objects for ObjectTemplates of type "go-template". Once the options are applied to the go template, the ObjectTemplate is removed from the component's list of objects.

The templates are assumed to be YAML.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewApplier

func NewApplier(opts ...ApplierConfig) options.Applier

NewApplier creates a new options applier instance using the specified ApplierConfigs.

Types

type ApplierConfig added in v0.12.0

type ApplierConfig func(*applier)

ApplierConfig is a config option that can be passed to NewApplier.

func WithGoTmplOptions added in v0.12.0

func WithGoTmplOptions(goTmplOptions ...string) ApplierConfig

WithGoTmplOptions modifies NewApplier so that the returned Applier uses the specified Go text/template options.

func WithSafeYAMLTemplaterOverride added in v0.14.0

func WithSafeYAMLTemplaterOverride() ApplierConfig

WithSafeYAML modifies the applier behavior to use the safetext YAML templater.

This overrides behavior specified in the template.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL