https://github.com/nathan-osman/pongo2-fileb0x
pongo2 loader for templates embedded with fileb0x
https://github.com/nathan-osman/pongo2-fileb0x
fileb0x golang pongo2
Last synced: 8 months ago
JSON representation
pongo2 loader for templates embedded with fileb0x
- Host: GitHub
- URL: https://github.com/nathan-osman/pongo2-fileb0x
- Owner: nathan-osman
- License: mit
- Created: 2018-04-06T19:08:49.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-04-06T19:27:20.000Z (over 7 years ago)
- Last Synced: 2024-12-31T19:16:10.964Z (9 months ago)
- Topics: fileb0x, golang, pongo2
- Language: Go
- Size: 3.91 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
## pongo2-fileb0x
[](https://godoc.org/github.com/nathan-osman/pongo2-fileb0x)
[](http://opensource.org/licenses/MIT)This (relatively simple) package provides a [pongo2](https://github.com/flosch/pongo2) loader for templates embedded in an executable with [fileb0x](https://github.com/UnnoTed/fileb0x).
### Usage
Begin by importing the package:
```go
import "github.com/nathan-osman/pongo2-fileb0x"
```Create a loader (`FS` and `CTX` are provided by `ab0x.go`, which is generated by fileb0x):
```go
l := &loader.Fileb0xLoader{
FS: FS,
CTX: CTX,
}```
Now create a new template set using the loader:
```go
t := pongo2.NewSet("", l)
```That's it!