bindata

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2015 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

type Data struct {
	// Asset, AssetDir are functions used to look up the assets.
	// These match the function signatures used by go-bindata so you
	// can just use method handles for these.
	Asset    func(string) ([]byte, error)
	AssetDir func(string) ([]string, error)

	// Context is the template context that is given when rendering
	Context map[string]interface{}
}

Data is the struct that wraps the assets go-bindata generates in your package to provide more helpers.

func (*Data) CopyDir

func (d *Data) CopyDir(dst, prefix string) error

CopyDir copies all the assets from the given prefix to the destination directory. It will automatically set file permissions, create folders, etc.

func (*Data) RenderAsset

func (d *Data) RenderAsset(dst, src string) error

RenderAsset renders a single bindata asset. This file will be processed as a template if it ends in ".tpl".

func (*Data) RenderReal

func (d *Data) RenderReal(dst, src string) error

RenderReal renders a real file (not a bindata'd file). This file will be processed as a template if it ends in ".tpl".

func (*Data) RenderString

func (d *Data) RenderString(tpl string) (string, error)

RenderString renders a string.

Jump to

Keyboard shortcuts

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