From d2e011fe9e8a35f319933829bd7c7bbca248b26b Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Wed, 5 Nov 2014 15:24:58 +0800 Subject: [PATCH] . --- file/files.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/file/files.go b/file/files.go index 54c81a6..311aae2 100644 --- a/file/files.go +++ b/file/files.go @@ -21,6 +21,7 @@ import ( // File node, used to construct the file tree. type FileNode struct { Name string `json:"name"` + Title string `json:"title"` Path string `json:"path"` IconSkin string `json:"iconSkin"` // Value should be end with a space Type string `json:"type"` // "f": file, "d": directory @@ -56,9 +57,8 @@ func GetFiles(w http.ResponseWriter, r *http.Request) { for _, workspace := range workspaces { workspacePath := workspace + conf.PathSeparator + "src" - workspaceNode := FileNode{Name: workspace[strings.LastIndex(workspace, conf.PathSeparator)+1:] + " (" + - workspace + ")", - Path: workspacePath, IconSkin: "ico-ztree-dir ", Type: "d", FileNodes: []*FileNode{}} + workspaceNode := FileNode{Name: workspace[strings.LastIndex(workspace, conf.PathSeparator)+1:], + Title: workspace, Path: workspacePath, IconSkin: "ico-ztree-dir ", Type: "d", FileNodes: []*FileNode{}} walk(workspacePath, &workspaceNode)