utils

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMissingFileName = errors.New("missing file name")
)

Functions

func CreateFileWithContent added in v1.0.1

func CreateFileWithContent(content []byte, destinationFileName string, destinationPath string, mode os.FileMode, append bool, logger logger.Logger) (string, error)

func Format

func Format(str string, value builder.Interfacable, index *uint32, input builder.Interfacable) string

func ProcessCondition added in v1.5.0

func ProcessCondition(expression string, result builder.Interfacable, index *uint32, input builder.Interfacable) (bool, error)

ProcessCondition reports whether the expression resolved to boolean true

func ProcessConditionWithSource added in v1.5.0

func ProcessConditionWithSource(expression string, result builder.Interfacable, source builder.Interfacable, index *uint32, input builder.Interfacable) (bool, error)

ProcessConditionWithSource is ProcessCondition with the source node the value was resolved from additionally exposed as fSrc

func ProcessExpression added in v0.0.43

func ProcessExpression(expression string, result builder.Interfacable, index *uint32, input builder.Interfacable) (builder.Interfacable, error)

func SafeNewSliceGenerator added in v0.0.31

func SafeNewSliceGenerator(begin, end, step int) []int

func SetLogger added in v1.0.14

func SetLogger(lvl string)

func String added in v0.0.26

func String(str string) *string

func ValidateExpression added in v1.5.0

func ValidateExpression(expression string) error

ValidateExpression compiles the expression without running it, catching syntax errors at validation time. Variables stay dynamically typed (their real types depend on the parsed data), and expressions containing placeholder syntax are skipped: they are formatted at runtime before compilation, so they cannot be checked statically

Types

This section is empty.

Jump to

Keyboard shortcuts

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