simplify
This commit is contained in:
2 files changed
+3
-3
No files matched your search
+2
-2
@@ -178,8 +178,8 @@ func New(database string, base User) (*FileManager, error) {
|
|||||||
err = db.Get("config", "commands", &m.Commands)
|
err = db.Get("config", "commands", &m.Commands)
|
||||||
if err != nil && err == storm.ErrNotFound {
|
if err != nil && err == storm.ErrNotFound {
|
||||||
m.Commands = map[string][]string{
|
m.Commands = map[string][]string{
|
||||||
"before_save": []string{},
|
"before_save": {},
|
||||||
"after_save": []string{},
|
"after_save": {},
|
||||||
}
|
}
|
||||||
err = db.Set("config", "commands", m.Commands)
|
err = db.Set("config", "commands", m.Commands)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -187,7 +187,7 @@ func cleanURL(path string) (string, string) {
|
|||||||
return "", path
|
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.
|
// renderFile renders a file using a template with some needed variables.
|
||||||
|
|||||||
Reference in new issue
Block a user