Fix calls to t.Helper and optimize

This commit is contained in:
Nise Void 2020-05-27 19:56:16 +02:00
parent 0cc5d27277
commit 58bacd98ce
Signed by: NiseVoid
GPG key ID: FBA14AC83EA602F3
2 changed files with 45 additions and 67 deletions

View file

@ -2,8 +2,6 @@ package assert
import (
"fmt"
"reflect"
"runtime"
"strconv"
)
@ -14,10 +12,3 @@ func prepMsg(msg []interface{}, format string, args ...interface{}) []interface{
func shell(i int) string {
return "\x1B[" + strconv.Itoa(i) + "m"
}
var ts = map[*runtime.Func]T{}
func t(a Assert) T {
f := runtime.FuncForPC(reflect.ValueOf(a).Pointer())
return ts[f]
}