An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

          

## pongo2-fileb0x

[![GoDoc](https://godoc.org/github.com/nathan-osman/pongo2-fileb0x?status.svg)](https://godoc.org/github.com/nathan-osman/pongo2-fileb0x)
[![MIT License](http://img.shields.io/badge/license-MIT-9370d8.svg?style=flat)](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!