tools

package
v1.7.9 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2022 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContextWalk

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

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

func ContextWalkObjects

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