utils

package
v3.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Walk

func Walk(t *jet.Template, v Visitor)

Walk walks the template ast and calls the Visit method on each node of the tree if you're not familiar with the Visitor pattern please check the visitor_test.go for usage examples

Types

type Visitor

type Visitor interface {
	Visit(vc VisitorContext, node jet.Node)
}

Visitor type implementing the visitor pattern

type VisitorContext

type VisitorContext struct {
	Visitor Visitor
}

VisitorContext context for the current inspection

func (VisitorContext) Visit

func (vc VisitorContext) Visit(node jet.Node)

type VisitorFunc

type VisitorFunc func(vc VisitorContext, node jet.Node)

VisitorFunc a func that implements the Visitor interface

func (VisitorFunc) Visit

func (visitor VisitorFunc) Visit(vc VisitorContext, node jet.Node)

Jump to

Keyboard shortcuts

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