tools

package
v0.162.0 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2022 License: AGPL-3.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContextWalk added in v0.64.6

func ContextWalk(context *types.XObject, callback func(types.XValue))

ContextWalk traverses the given context invoking the callback for each non-nil value

func ContextWalkObjects added in v0.64.6

func ContextWalkObjects(context *types.XObject, callback func(*types.XObject))

ContextWalkObjects traverses the given context invoking the callback for each object found

func FindContextRefsInTemplate

func FindContextRefsInTemplate(template string, allowedTopLevels []string, callback func([]string)) error

FindContextRefsInTemplate audits context references in the given template. Note that the case of the found references is preserved as these may be significant, e.g. ["X"] vs ["x"] in JSON

func RefactorTemplate

func RefactorTemplate(template string, allowedTopLevels []string) (string, error)

RefactorTemplate refactors the passed in template

Types

This section is empty.

Jump to

Keyboard shortcuts

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