Documentation
¶
Overview ¶
Package template implements the JSONPath template format used by kubectl.
See https://kubernetes.io/docs/reference/kubectl/jsonpath/ for more information.
In some cases, it deviates slightly from the syntax accepted by kubectl's JSONPath expressions:
- The use of \ to escape the next character in identifiers is not supported.
- The use of @['x.y'] (equivalent to @.x.y) inside brackets is not supported, as it could conflict with an actual key in a JSON object.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultFormatter ¶
func ExpressionLanguage ¶
func TemplateLanguage ¶
func TemplateLanguage(opts ...TemplateOption) gval.Language
Types ¶
type FormatterFunc ¶
type TemplateOption ¶
type TemplateOption func(tl *templateLanguage)
func WithExpressionLanguageVariableVisitor ¶
func WithExpressionLanguageVariableVisitor(visitor jsonpath.VariableVisitor) TemplateOption
func WithFormatter ¶
func WithFormatter(formatter FormatterFunc) TemplateOption
Click to show internal directories.
Click to hide internal directories.