template

package
v0.0.0-...-2ad8e2e Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FS

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

func NewFS

func NewFS(fsys fs.FS) *FS

func (*FS) Funcs

func (fsys *FS) Funcs(funcs ...map[string]any) *FS

Funcs adds the elements of the argument map to the template's function map.

func (*FS) ParseFiles

func (fsys *FS) ParseFiles(patterns ...string) (Template, error)

ParseFile reads from the file system fs

type Template

type Template interface {
	Execute(wr io.Writer, data any) error
}

Jump to

Keyboard shortcuts

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