Fix calls to t.Helper and optimize
This commit is contained in:
parent
0cc5d27277
commit
58bacd98ce
2 changed files with 45 additions and 67 deletions
|
@ -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]
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue