🎨 读取用户目录
This commit is contained in:
parent
bb3d4979b7
commit
f1cc112a52
|
@ -125,8 +125,7 @@ func initUsers(confUsers string) {
|
|||
|
||||
user := &User{}
|
||||
|
||||
bytes, _ := ioutil.ReadFile("conf/users/" + name)
|
||||
|
||||
bytes, _ := ioutil.ReadFile(filepath.Join(confUsers, name))
|
||||
err := json.Unmarshal(bytes, user)
|
||||
if err != nil {
|
||||
logger.Errorf("Parses [%s] error: %v, skip loading this user", name, err)
|
||||
|
|
3
main.go
3
main.go
|
@ -66,9 +66,6 @@ func init() {
|
|||
log.SetLevel("warn")
|
||||
logger = log.NewLogger(os.Stdout)
|
||||
|
||||
logger.Warn(*confUsers)
|
||||
logger.Warn(*confUsersWorkspaces)
|
||||
|
||||
//wd := util.OS.Pwd()
|
||||
//if strings.HasPrefix(wd, os.TempDir()) {
|
||||
// logger.Error("Don't run Wide in OS' temp directory or with `go run`")
|
||||
|
|
Loading…
Reference in New Issue