feat:支持后台模式与网络守护
This commit is contained in:
13
util/util.go
13
util/util.go
@@ -52,13 +52,14 @@ func Sha1(content string) string {
|
||||
}
|
||||
|
||||
func ErrHandler(err error) {
|
||||
if err != nil {
|
||||
Log.Println("运行出错,状态异常")
|
||||
if global.Config.Settings.DemoMode {
|
||||
Log.Fatalln(err)
|
||||
}
|
||||
os.Exit(1)
|
||||
if !global.Status.Output {
|
||||
return
|
||||
}
|
||||
Log.Println("运行出错,状态异常")
|
||||
if global.Config.Settings.DemoMode {
|
||||
Log.Fatalln(err)
|
||||
}
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
func NetDailEr() func(ctx context.Context, network, address string) (net.Conn, error) {
|
||||
|
||||
Reference in New Issue
Block a user