This commit is contained in:
Henrique Dias 2017-07-19 07:43:04 +01:00
parent 21bb782a3b
commit a3c70f7930
No known key found for this signature in database
GPG Key ID: 936F5EB68D786730
2 changed files with 3 additions and 3 deletions

View File

@ -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)
}

View File

@ -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.