This (relatively simple) package provides a pongo2 loader for templates embedded in an executable with fileb0x.
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!