util

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainsAction

func ContainsAction(content []byte) bool

ContainsAction checks if the given content contains Go template actions

func FindActionEnd

func FindActionEnd(line []byte, startPos int) int

FindActionEnd finds the end of a template action starting from position startPos Returns the position after the closing }} or -1 if not found

Types

type ActionState

type ActionState struct {
	// contains filtered or unexported fields
}

ActionState tracks state when parsing through template actions

func NewActionState

func NewActionState() *ActionState

NewActionState creates a new template action state tracker

func (*ActionState) InAction

func (t *ActionState) InAction() bool

InAction returns true if currently inside a template action

func (*ActionState) ProcessChar

func (t *ActionState) ProcessChar(line []byte, i int) bool

ProcessChar processes a character and updates template action state Returns true if the character should be ignored for other parsing logic

Jump to

Keyboard shortcuts

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