This commit is contained in:
parent
cedc88fc0a
commit
7c69764aed
|
@ -40,7 +40,7 @@ var Wide conf
|
||||||
var rawWide conf
|
var rawWide conf
|
||||||
|
|
||||||
// 定时检查 Wide 运行环境.
|
// 定时检查 Wide 运行环境.
|
||||||
// 如果是特别严重的问题(比如 $GOPATH 不存在)则退出进程。另一些不太严重的问题(比如 gocode 不存在)则放入全局通知队列。
|
// 如果是特别严重的问题(比如 $GOPATH 不存在)则退出进程,另一些不太严重的问题(比如 gocode 不存在)则放入全局通知队列.
|
||||||
func CheckEnv() {
|
func CheckEnv() {
|
||||||
go func() {
|
go func() {
|
||||||
for {
|
for {
|
||||||
|
@ -81,7 +81,7 @@ func CheckEnv() {
|
||||||
func (*conf) GetUserWorkspace(username string) string {
|
func (*conf) GetUserWorkspace(username string) string {
|
||||||
for _, user := range Wide.Users {
|
for _, user := range Wide.Users {
|
||||||
if user.Name == username {
|
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)
|
return filepath.FromSlash(ret)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
{
|
{
|
||||||
"Name": "admin",
|
"Name": "admin",
|
||||||
"Password": "admin",
|
"Password": "admin",
|
||||||
"Workspace": "{Pwd}/data/user_workspaces/admin"
|
"Workspace": "{pwd}/data/user_workspaces/admin"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
|
@ -23,7 +23,7 @@
|
||||||
{
|
{
|
||||||
"Name": "admin", 用户名
|
"Name": "admin", 用户名
|
||||||
"Password": "admin", 用户密码
|
"Password": "admin", 用户密码
|
||||||
"Workspace": "{Pwd}/data/user_workspaces/admin" 用户工作空间(GOPATH)
|
"Workspace": "{pwd}/data/user_workspaces/admin" 用户工作空间(GOPATH)
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue