source

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateParseTree

func CreateParseTree(templateName, templateSource, leftDelim, rightDelim string, treeSet map[string]*parse.Tree) (*parse.Tree, error)

func ResolveCommentTypes

func ResolveCommentTypes(comments []TypeComment, resolved func(comment TypeComment, resolvedType types.Type, err error) error) error

Types

type TypeComment

type TypeComment struct {
	Package    string
	Identifier string

	Filepath    string
	CommentNode *parse.CommentNode
	Tree        *parse.Tree
}

TypeComment represents a gotype comment in a template. These comments look something like this: {{- /*gotype: example.com/package-name.TypeName*/ -}}

func FindTypeComments

func FindTypeComments(filePath string, tree *parse.Tree) ([]TypeComment, error)

Jump to

Keyboard shortcuts

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