From 525c063cf0279ec9ffca9a725bc4f2399d647c33 Mon Sep 17 00:00:00 2001 From: Mmx233 Date: Wed, 2 Mar 2022 22:54:45 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=8E=BB=E9=99=A4=E6=97=A0=E6=95=88?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- util/log.go | 9 --------- 1 file changed, 9 deletions(-) diff --git a/util/log.go b/util/log.go index 54314b6..69fbd5a 100644 --- a/util/log.go +++ b/util/log.go @@ -5,7 +5,6 @@ import ( "github.com/Mmx233/tool" "log" "os" - "runtime" "strings" "time" ) @@ -82,11 +81,3 @@ func (c *loG) Warn(a ...interface{}) { func (c *loG) Fatal(a ...interface{}) { c.print(true, append([]interface{}{"[FATAL] "}, a...)...) } - -func (c *loG) CatchRecover() { - if e := recover(); e != nil { - c.Debug("发生恐慌") - var buf [4096]byte - c.Fatal(e, "\n", string(buf[:runtime.Stack(buf[:], false)])) - } -}