vfstemplate

package
v0.0.0-...-f1e31cf Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2023 License: MIT Imports: 6 Imported by: 56

Documentation

Overview

Package vfstemplate offers html/template helpers that use http.FileSystem.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseFiles

func ParseFiles(fs http.FileSystem, t *template.Template, filenames ...string) (*template.Template, error)

ParseFiles creates a new Template if t is nil and parses the template definitions from the named files. The returned template's name will have the (base) name and (parsed) contents of the first file. There must be at least one file. If an error occurs, parsing stops and the returned *Template is nil.

func ParseGlob

func ParseGlob(fs http.FileSystem, t *template.Template, pattern string) (*template.Template, error)

ParseGlob parses the template definitions in the files identified by the pattern and associates the resulting templates with t. The pattern is processed by vfspath.Glob and must match at least one file. ParseGlob is equivalent to calling t.ParseFiles with the list of files matched by the pattern.

Types

This section is empty.

Jump to

Keyboard shortcuts

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