mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-09-22 00:20:47 +02:00
♻️ 将退出码移到 logging 项目中
This commit is contained in:
parent
e99b7fd588
commit
2601605953
13 changed files with 29 additions and 39 deletions
|
@ -84,7 +84,7 @@ func Serve(fastMode bool) {
|
|||
if nil != err {
|
||||
if !fastMode {
|
||||
logging.LogErrorf("boot kernel failed: %s", err)
|
||||
os.Exit(util.ExitCodeUnavailablePort)
|
||||
os.Exit(logging.ExitCodeUnavailablePort)
|
||||
}
|
||||
|
||||
// fast 模式下启动失败则直接返回
|
||||
|
@ -95,7 +95,7 @@ func Serve(fastMode bool) {
|
|||
if nil != err {
|
||||
if !fastMode {
|
||||
logging.LogErrorf("boot kernel failed: %s", err)
|
||||
os.Exit(util.ExitCodeUnavailablePort)
|
||||
os.Exit(logging.ExitCodeUnavailablePort)
|
||||
}
|
||||
}
|
||||
util.ServerPort = port
|
||||
|
@ -129,7 +129,7 @@ func Serve(fastMode bool) {
|
|||
if err = http.Serve(ln, ginServer); nil != err {
|
||||
if !fastMode {
|
||||
logging.LogErrorf("boot kernel failed: %s", err)
|
||||
os.Exit(util.ExitCodeUnavailablePort)
|
||||
os.Exit(logging.ExitCodeUnavailablePort)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue