go.rice needs string literal

This commit is contained in:
andreimarcu 2015-09-28 21:58:50 -04:00
parent 2255716c7d
commit ae1933c93b
2 changed files with 3 additions and 3 deletions

View File

@ -51,7 +51,7 @@ func setup() {
}
// Template setup
p2l, err := NewPongo2Loader("templates")
p2l, err := NewPongo2TemplatesLoader()
if err != nil {
fmt.Println("Error: could not load templates")
os.Exit(1)

View File

@ -14,10 +14,10 @@ type Pongo2Loader struct {
box *rice.Box
}
func NewPongo2Loader(boxName string) (*Pongo2Loader, error) {
func NewPongo2TemplatesLoader() (*Pongo2Loader, error) {
fs := &Pongo2Loader{}
p2l, err := rice.FindBox(boxName)
p2l, err := rice.FindBox("templates")
if err != nil {
return nil, err
}