make some updates

This commit is contained in:
Henrique Dias
2016-06-10 22:38:52 +01:00
parent 65d3c33381
commit 77e5bd2b9e
4 changed files with 66 additions and 52 deletions

View File

@@ -4,7 +4,6 @@ import (
"fmt"
"io/ioutil"
"net/http"
"text/template"
"github.com/mholt/caddy"
"github.com/mholt/caddy/caddyhttp/httpserver"
@@ -19,20 +18,6 @@ func init() {
// setup configures a new Browse middleware instance.
func setup(c *caddy.Controller) error {
// Second argument would be the template file to use
tplBytes, err := Asset("templates/template.tmpl")
if err != nil {
return err
}
tplText := string(tplBytes)
// Build the template
tpl, err := template.New("listing").Parse(tplText)
if err != nil {
return err
}
Template = tpl
configs, err := fileManagerParse(c)
if err != nil {
return err