Documentation ¶
Index ¶
- func ExpandYAML(s string, mapping func(string) (string, bool)) string
- func ExpandYAMLBytes(b []byte, mapping func(string) (string, bool)) []byte
- func ExpandenvYAML(s string) string
- func ExpandenvYAMLBytes(b []byte) []byte
- func ExprRepFn(delimStart, delimEnd string, env any) repFn
- func InterpolateRepFn(mapping func(string) (string, bool)) repFn
- func ReplaceYAML(s string, repFn func(s string) (string, error), opts ...Option) (string, error)
- type Mapper
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExpandYAML ¶
ExpandYAML replaces ${var} or $var in the values of YAML (string) based on the mapping function.
func ExpandYAMLBytes ¶
ExpandYAML replaces ${var} or $var in the values of YAML ([]byte) based on the mapping function.
func ExpandenvYAML ¶
ExpandenvYAML replaces ${var} or $var in the values of YAML (string) according to the values of the current environment variables.
func ExpandenvYAMLBytes ¶
ExpandenvYAML replaces ${var} or $var in the values of YAML ([]byte) according to the values of the current environment variables.
func InterpolateRepFn ¶ added in v0.5.0
Types ¶
type Option ¶ added in v0.8.0
type Option func(*config) error
func QuoteCollection ¶ added in v0.8.0
func QuoteCollection() Option
QuoteCollection - Quotes the replaced value as a string if it is a map or slice.
func ReplaceMapKey ¶ added in v0.8.0
func ReplaceMapKey() Option
ReplaceMapKey - Replace map key of YAML.
Click to show internal directories.
Click to hide internal directories.