From a3c70f7930a617aa2c44973bf5d073f0e71d44b6 Mon Sep 17 00:00:00 2001 From: Henrique Dias Date: Wed, 19 Jul 2017 07:43:04 +0100 Subject: [PATCH] simplify --- filemanager.go | 4 ++-- http.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/filemanager.go b/filemanager.go index f3575d80..5b2607ad 100644 --- a/filemanager.go +++ b/filemanager.go @@ -178,8 +178,8 @@ func New(database string, base User) (*FileManager, error) { err = db.Get("config", "commands", &m.Commands) if err != nil && err == storm.ErrNotFound { m.Commands = map[string][]string{ - "before_save": []string{}, - "after_save": []string{}, + "before_save": {}, + "after_save": {}, } err = db.Set("config", "commands", m.Commands) } diff --git a/http.go b/http.go index 0c422679..1e12e2d0 100644 --- a/http.go +++ b/http.go @@ -187,7 +187,7 @@ func cleanURL(path string) (string, string) { return "", path } - return path[0:i], path[i:len(path)] + return path[0:i], path[i:] } // renderFile renders a file using a template with some needed variables.