template

package
v0.0.0-...-b4c0e7c Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TemplateGetter

type TemplateGetter interface {
	// Get retrieves a Template parsed from the file indicated by the path argument.
	// The path argument is relative to the hack directory at the root of this repo.
	Get(path string) (*tmpl.Template, error)
}

TemplateGetter encapsulates the task of getting template data from the repository.

func NewCompiledTemplateGetter

func NewCompiledTemplateGetter() TemplateGetter

func NewFSTemplateGetter

func NewFSTemplateGetter(basepath string) TemplateGetter

NewFSTemplateGetter returns a template getter that can find templates from paths within the root "hack" directory of the repository it assumes its own relative path within the project structure see tests get_tests.go to help understand how it is used.

Jump to

Keyboard shortcuts

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