MCPcopy
hub / github.com/stretchr/testify / funcName

Function funcName

mock/mock.go:1281–1291  ·  view source on GitHub ↗
(f *runtime.Func)

Source from the content-addressed store, hash-verified

1279}
1280
1281func funcName(f *runtime.Func) string {
1282 name := f.Name()
1283 trimmed := strings.TrimSuffix(path.Base(name), path.Ext(name))
1284 splitted := strings.Split(trimmed, ".")
1285
1286 if len(splitted) == 0 {
1287 return trimmed
1288 }
1289
1290 return splitted[len(splitted)-1]
1291}
1292
1293func isFuncSame(f1, f2 *runtime.Func) bool {
1294 f1File, f1Loc := f1.FileLine(f1.Entry())

Callers 1

assertOptsFunction · 0.85

Calls 1

NameMethod · 0.65

Tested by

no test coverage detected