...
1 package gonja
2
3 import (
4 "github.com/noirbizarre/gonja/config"
5 "github.com/noirbizarre/gonja/exec"
6 "github.com/noirbizarre/gonja/loaders"
7 )
8
9 var (
10
11 DefaultLoader = loaders.MustNewFileSystemLoader("")
12
13
14 DefaultEnv = NewEnvironment(config.DefaultConfig, DefaultLoader)
15
16
17 FromString = DefaultEnv.FromString
18 FromBytes = DefaultEnv.FromBytes
19 FromFile = DefaultEnv.FromFile
20 FromCache = DefaultEnv.FromCache
21
22
23 Globals = DefaultEnv.Globals
24 )
25
26
27
28
29 func Must(tpl *exec.Template, err error) *exec.Template {
30 if err != nil {
31 panic(err)
32 }
33 return tpl
34 }
35
View as plain text