Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
fix: 添加color
Browse files Browse the repository at this point in the history
  • Loading branch information
白云辉 committed Jul 31, 2020
1 parent cb99f79 commit be2031d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions util.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand All @@ -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)
Expand Down

0 comments on commit be2031d

Please sign in to comment.