Improvements :)

Former-commit-id: c1c1881302a241fdc7140e6aabeb9b49977bd7c6 [formerly 84bb454c2f34baffd9dfa91645b8aff149e52620] [formerly 29e258c7a16db1ca8a3fde7c5e4e3cffc47899a6 [formerly 84ddad027fed623021092d56872ff138bc5ea416]]
Former-commit-id: 0018a51df5bc801b783a3ffe17d9f33c504ce094 [formerly 0072c425cd4754e38f30007ab9f5272ea4b40370]
Former-commit-id: d298f006e58ef9e4987def4bc354818062b30fcd
This commit is contained in:
Henrique Dias
2017-06-28 22:20:28 +01:00
parent 7f5a361bc1
commit 346412eb2a
21 changed files with 467 additions and 445 deletions

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)