asttemplate

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

Manager is a manager for source code templates.

Loads, keeps and returns templates.

func NewManager

func NewManager() *Manager

NewManager returns a new template manager.

func (*Manager) GetTemplates

func (m *Manager) GetTemplates() ([]astModels.Decl, error)

GetTemplates returns loaded templates.

func (*Manager) Load

func (m *Manager) Load() error

Load loads templates from the source code.

Determines the template source code actual absoule path, parses the source code files and saves the templates.

func (*Manager) Visit

func (m *Manager) Visit(node ast.Node) ast.Visitor

Visit implements the ast.Visitor interface.

Allows the Manager to walk over nodes in a parsed file.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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