We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
/
1 parent cda25a3 commit 24488d7Copy full SHA for 24488d7
1 file changed
testrunner/extract.go
@@ -11,11 +11,8 @@ import (
11
// Split a test name into its constituent parts
12
// https://blog.golang.org/subtests#:~:text=The%20full%20name%20of%20a,first%20argument%20to%20Run%20otherwise.
13
func splitTestName(testName string) (string, string) {
14
- t := strings.Split(testName, "/")
15
- if len(t) == 1 {
16
- return t[0], ""
17
- }
18
- return t[0], t[1]
+ before, after, _ := strings.Cut(testName, "/")
+ return before, after
19
}
20
21
func FindTestFile(codePath string) string {
0 commit comments