This commit is contained in:
Liang Ding 2014-09-16 21:19:56 +08:00
parent cedc88fc0a
commit 7c69764aed
3 changed files with 4 additions and 4 deletions

View File

@ -40,7 +40,7 @@ var Wide conf
var rawWide conf
// 定时检查 Wide 运行环境.
// 如果是特别严重的问题(比如 $GOPATH 不存在)则退出进程。另一些不太严重的问题(比如 gocode 不存在)则放入全局通知队列。
// 如果是特别严重的问题(比如 $GOPATH 不存在)则退出进程,另一些不太严重的问题(比如 gocode 不存在)则放入全局通知队列.
func CheckEnv() {
go func() {
for {
@ -81,7 +81,7 @@ func CheckEnv() {
func (*conf) GetUserWorkspace(username string) string {
for _, user := range Wide.Users {
if user.Name == username {
ret := strings.Replace(user.Workspace, "{Pwd}", Wide.Pwd, 1)
ret := strings.Replace(user.Workspace, "{pwd}", Wide.Pwd, 1)
return filepath.FromSlash(ret)
}
}

View File

@ -12,7 +12,7 @@
{
"Name": "admin",
"Password": "admin",
"Workspace": "{Pwd}/data/user_workspaces/admin"
"Workspace": "{pwd}/data/user_workspaces/admin"
}
]
}

View File

@ -23,7 +23,7 @@
{
"Name": "admin", 用户名
"Password": "admin", 用户密码
"Workspace": "{Pwd}/data/user_workspaces/admin" 用户工作空间GOPATH
"Workspace": "{pwd}/data/user_workspaces/admin" 用户工作空间GOPATH
}
]
}