From be2031d4564e70ed10bf94bdc21aed7d236af51a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E4=BA=91=E8=BE=89?= Date: Fri, 31 Jul 2020 09:35:43 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=B7=BB=E5=8A=A0color?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- util.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util.go b/util.go index 2c6c9c6..fefc4f5 100644 --- a/util.go +++ b/util.go @@ -58,7 +58,7 @@ func callerWithDepth(callDepths ...int) string { f := frame(pcs[0]) fn := runtime.FuncForPC(f.pc()) if fn == nil { - return ErrUnknownType.Error() + return "unknown type" } file, line := fn.FileLine(f.pc()) @@ -67,7 +67,7 @@ func callerWithDepth(callDepths ...int) string { func callerWithFunc(fn reflect.Value) string { if !fn.IsValid() || fn.IsNil() || fn.Kind() != reflect.Func { - Panic(ErrNotFuncType) + panic(ErrNotFuncType) } var _fn = fn.Pointer() var file, line = runtime.FuncForPC(_fn).FileLine(_fn)