🎨 读取用户目录

This commit is contained in:
Liang Ding 2019-05-16 12:07:21 +08:00
parent bb3d4979b7
commit f1cc112a52
No known key found for this signature in database
GPG Key ID: 136F30F901A2231D
2 changed files with 1 additions and 5 deletions

View File

@ -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)

View File

@ -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`")