/pongo2-fileb0x

pongo2 loader for templates embedded with fileb0x

Primary LanguageGoMIT LicenseMIT

pongo2-fileb0x

GoDoc MIT License

This (relatively simple) package provides a pongo2 loader for templates embedded in an executable with fileb0x.

Usage

Begin by importing the package:

import "github.com/nathan-osman/pongo2-fileb0x"

Create a loader (FS and CTX are provided by ab0x.go, which is generated by fileb0x):

l := &loader.Fileb0xLoader{
    FS:  FS,
    CTX: CTX,
}

Now create a new template set using the loader:

t := pongo2.NewSet("", l)

That's it!