Improvements :)

This commit is contained in:
Henrique Dias committed 2017-06-28 22:20:28 +01:00
1 parent 7aa6a549f9
commit 84ddad027f
21 files changed
+467 -445

No files matched your search

+2 -1
View File
@@ -13,6 +13,7 @@ import (
// editor contains the information to fill the editor template.
type editor struct {
*fileInfo
Class string `json:"class"`
Mode string `json:"mode"`
Visual bool `json:"visual"`
@@ -28,7 +29,7 @@ func getEditor(r *http.Request, i *fileInfo) (*editor, error) {
var err error
// Create a new editor variable and set the mode
e := &editor{}
e := &editor{fileInfo: i}
e.Mode = editorMode(i.Name)
e.Class = editorClass(e.Mode)