♻️ 将退出码移到 logging 项目中

This commit is contained in:
Liang Ding 2023-03-18 18:10:06 +08:00
parent e99b7fd588
commit 2601605953
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
13 changed files with 29 additions and 39 deletions

View file

@ -46,7 +46,7 @@ func BootMobile(container, appDir, workspaceBaseDir, lang string) {
if !gulu.File.IsExist(userHomeConfDir) {
if err := os.MkdirAll(userHomeConfDir, 0755); nil != err && !os.IsExist(err) {
log.Printf("create user home conf folder [%s] failed: %s", userHomeConfDir, err)
os.Exit(ExitCodeCreateConfDirErr)
os.Exit(logging.ExitCodeCreateConfDirErr)
}
}
@ -54,7 +54,7 @@ func BootMobile(container, appDir, workspaceBaseDir, lang string) {
defaultWorkspaceDir := filepath.Join(workspaceBaseDir, "siyuan")
if err := os.MkdirAll(defaultWorkspaceDir, 0755); nil != err && !os.IsExist(err) {
log.Printf("create default workspace folder [%s] failed: %s", defaultWorkspaceDir, err)
os.Exit(ExitCodeCreateWorkspaceDirErr)
os.Exit(logging.ExitCodeCreateWorkspaceDirErr)
}
initWorkspaceDirMobile(workspaceBaseDir)