Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainsAction ¶
ContainsAction checks if the given content contains Go template actions
func FindActionEnd ¶
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
Click to show internal directories.
Click to hide internal directories.