template

package
v0.0.0-...-f4e8587 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChrootLoader

type ChrootLoader struct {
	Path string
}

ChrootLoader is a pong2 compatible file loader which restricts all accesses to a directory

func (ChrootLoader) Abs

func (l ChrootLoader) Abs(base string, name string) string

Abs resolves a filename relative to the base directory. Absolute paths are allowed. When there's no base dir set, the absolute path to the filename will be calculated based on either the provided base directory (which might be a path of a template which includes another template) or the current working directory.

func (ChrootLoader) Get

func (l ChrootLoader) Get(path string) (io.Reader, error)

Get reads the path's content from your local filesystem.

Jump to

Keyboard shortcuts

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