From d256f5f0d433ca21d893bcbed5a6814a2cba2a7d Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Sun, 22 Jan 2017 14:39:50 +0100 Subject: [PATCH] Remove template directory from bindata --- httpHelper.go | 8 -------- main.go | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/httpHelper.go b/httpHelper.go index 27e5fd0..f6e20a4 100644 --- a/httpHelper.go +++ b/httpHelper.go @@ -27,14 +27,6 @@ func httpHelper(f httpHelperFunc) http.HandlerFunc { } if template != nil { - // Postponed until https://github.com/flosch/pongo2/issues/68 - // - // tplsrc, err := Asset("templates/" + *template) - // if err != nil { - // fmt.Printf("ERR: Could not find template '%s'\n", *template) - // http.Error(res, "An error ocurred.", http.StatusInternalServerError) - // return - // } ts := pongo2.NewSet("frontend") ts.SetBaseDirectory("templates") tpl, err := ts.FromFile(*template) diff --git a/main.go b/main.go index 6f4c089..47cc861 100644 --- a/main.go +++ b/main.go @@ -1,6 +1,6 @@ package main // import "github.com/Luzifer/cloudkeys-go" -//go:generate go-bindata assets templates +//go:generate go-bindata assets import ( "crypto/sha1"