From c3acdf13c25bc9e951891d09222cf04949685a02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=ABl=20Stemmer?= Date: Sun, 27 Feb 2022 21:23:55 +0000 Subject: [PATCH] parser/gotest: Remove unnecessary string concatenation in regexSummary --- pkg/parser/gotest/gotest.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/parser/gotest/gotest.go b/pkg/parser/gotest/gotest.go index b79a5a6..5b7d7c2 100644 --- a/pkg/parser/gotest/gotest.go +++ b/pkg/parser/gotest/gotest.go @@ -19,7 +19,7 @@ var ( regexCoverage = regexp.MustCompile(`^coverage:\s+(\d+|\d+\.\d+)%\s+of\s+statements(?:\sin\s(.+))?$`) regexEndTest = regexp.MustCompile(`((?: )*)--- (PASS|FAIL|SKIP): ([^ ]+) \((\d+\.\d+)(?: seconds|s)\)`) regexStatus = regexp.MustCompile(`^(PASS|FAIL|SKIP)$`) - regexSummary = regexp.MustCompile(`^(ok|FAIL)\s+([^ ]+)\s+` + `(?:(\d+\.\d+)s|(\(cached\)|\[\w+ failed]))` + `(?:\s+coverage:\s+(\d+\.\d+)%\sof\sstatements(?:\sin\s(.+))?)?$`) + regexSummary = regexp.MustCompile(`^(ok|FAIL)\s+([^ ]+)\s+(?:(\d+\.\d+)s|(\(cached\)|\[\w+ failed]))(?:\s+coverage:\s+(\d+\.\d+)%\sof\sstatements(?:\sin\s(.+))?)?$`) ) // Parse parses Go test output from the given io.Reader r.