2019-06-22 20:34:19 +02:00
# Jet Engine Example (Embedded)
Take a look at the [../template_jet_0 ](../template_jet_0 )'s README first.
This example teaches you how to use jet templates embedded in your applications with ease using the Iris built-in Jet view engine.
This example is a customized fork of https://github.com/CloudyKit/jet/tree/master/examples/asset_packaging, so you can
notice the differences side by side. For example, you don't have to use any external package inside your application,
2019-12-29 18:14:41 +01:00
Iris manually builds the template loader for binary data when Asset and AssetNames are available through tools like the [go-bindata ](github.com/go-bindata/go-bindata ).
2019-06-22 20:34:19 +02:00
Note that you can still use any custom loaders through the `JetEngine.SetLoader`
which overrides any previous loaders like `JetEngine.Binary` we use on this example.
## How to run
```sh
2020-07-24 12:03:49 +02:00
$ go get -u github.com/go-bindata/go-bindata/v3/go-bindata
2019-06-22 20:34:19 +02:00
$ go-bindata ./views/...
$ go build
$ ./template_jet_0_embedded
```
Repeat the above steps on any `./views` changes.
> html files are not used, only binary data. You can move or delete the `./views` folder.