pobin

package module
v0.0.0-...-a1ad054 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2015 License: GPL-3.0 Imports: 4 Imported by: 1 module, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Pobin a memory template loader

Build Status

Pobin is a Template Loader for pongo2 that is used to load assets from go-bindata.

Usage

It's easy to use pobin in combination with pongo2 and go-bindata:

  1. First compile your assets go-bindata -o assets/templates.go -pkg=assets templates/...
  2. Initialize a pongo2 template set. Because of the way go-bindata works, you have to define your own loading function as a parameter.
assetSet := pongo2.NewSet("assetfs", pobin.NewMemoryTemplateLoader(assets.Asset))

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMemoryTemplateLoader

func NewMemoryTemplateLoader(loaderFunc func(path string) ([]byte, error)) pongo2.TemplateLoader

NewMemoryTemplateLoader loads a bindata template loader

func NewMemoryTemplateLoaderWithFallback

func NewMemoryTemplateLoaderWithFallback(loaderFunc func(path string) ([]byte, error), fallbackLoader pongo2.TemplateLoader) pongo2.TemplateLoader

NewMemoryTemplateLoaderWithFallback loads a bindata template loader, but if the file is not found it will try to find it in the fallback loader with the same path

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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