go.rice needs string literal
This commit is contained in:
parent
2255716c7d
commit
ae1933c93b
@ -51,7 +51,7 @@ func setup() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Template setup
|
// Template setup
|
||||||
p2l, err := NewPongo2Loader("templates")
|
p2l, err := NewPongo2TemplatesLoader()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println("Error: could not load templates")
|
fmt.Println("Error: could not load templates")
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
|
@ -14,10 +14,10 @@ type Pongo2Loader struct {
|
|||||||
box *rice.Box
|
box *rice.Box
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewPongo2Loader(boxName string) (*Pongo2Loader, error) {
|
func NewPongo2TemplatesLoader() (*Pongo2Loader, error) {
|
||||||
fs := &Pongo2Loader{}
|
fs := &Pongo2Loader{}
|
||||||
|
|
||||||
p2l, err := rice.FindBox(boxName)
|
p2l, err := rice.FindBox("templates")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user