embedded

package
v0.0.0-...-b84eec1 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2020 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Embedded

type Embedded struct {
	Asset func(name string) ([]byte, error)
}

func (*Embedded) Asset2

func (emb *Embedded) Asset2(name string) ([]byte, error)

func (*Embedded) FindAssetWithCT

func (emb *Embedded) FindAssetWithCT(name string, ct *string) ([]byte, error)

returns the asset and its content type

type EmbeddedTemplateLoader

type EmbeddedTemplateLoader struct {
	Embedded *Embedded
}

func (*EmbeddedTemplateLoader) Abs

func (htl *EmbeddedTemplateLoader) Abs(base, name string) (absPath string)

Abs calculates the path to a given template. Whenever a path must be resolved due to an import from another template, the base equals the parent template's path.

func (*EmbeddedTemplateLoader) Get

func (htl *EmbeddedTemplateLoader) Get(path string) (io.Reader, error)

Get returns an io.Reader where the template's content can be read from.

Jump to

Keyboard shortcuts

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