templateparsing

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsNil

func IsNil(i interface{}) bool

Types

type TemplateCallTree

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

func NewTemplateCallTree

func NewTemplateCallTree() *TemplateCallTree

func ParseTemplate

func ParseTemplate(template string) (*TemplateCallTree, error)

func (*TemplateCallTree) Fprint

func (c *TemplateCallTree) Fprint(depth int) string

func (*TemplateCallTree) IsValid

func (c *TemplateCallTree) IsValid() bool

func (*TemplateCallTree) List

func (*TemplateCallTree) String

func (c *TemplateCallTree) String() string

func (*TemplateCallTree) Struct

func (*TemplateCallTree) Validate

func (c *TemplateCallTree) Validate(pkg *packages.Package, typeInfo types.Type) (*ValidationResult, error)

type TemplateCallTreeEntry

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

func NewTemplateCallTreeEntry

func NewTemplateCallTreeEntry() *TemplateCallTreeEntry

func (*TemplateCallTreeEntry) Fprint

func (c *TemplateCallTreeEntry) Fprint(depth int) string

func (*TemplateCallTreeEntry) IsValid

func (c *TemplateCallTreeEntry) IsValid() bool

type TreeBuilder

type TreeBuilder func(*TemplateCallTree, parse.Node) error

type ValidationResult

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

func NewValidationResult

func NewValidationResult() *ValidationResult

func (*ValidationResult) AddErrorMessage

func (r *ValidationResult) AddErrorMessage(breadCrumb string, message string)

func (*ValidationResult) ErrorMessages

func (r *ValidationResult) ErrorMessages() []string

func (*ValidationResult) IsValid

func (r *ValidationResult) IsValid() bool

Jump to

Keyboard shortcuts

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