utils

package
v2.1.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2017 License: Apache-2.0 Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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