mirror of
https://github.com/jstemmer/go-junit-report.git
synced 2025-04-09 15:18:08 -05:00
junit: Simplify the formatOutput function
This function was used in the past to perform some operations on the individual output lines before joining them together. However, now it's only used to combine the collection of lines into a single output string.
This commit is contained in:
parent
395886ab94
commit
f33a746c85
@ -264,14 +264,9 @@ func formatBenchmarkTime(d time.Duration) string {
|
|||||||
return fmt.Sprintf("%.9f", d.Seconds())
|
return fmt.Sprintf("%.9f", d.Seconds())
|
||||||
}
|
}
|
||||||
|
|
||||||
// formatOutput trims the test whitespace prefix from each line and joins all
|
// formatOutput combines the lines from the given output into a single string.
|
||||||
// the lines.
|
|
||||||
func formatOutput(output []string, indent int) string {
|
func formatOutput(output []string, indent int) string {
|
||||||
var lines []string
|
return strings.Join(output, "\n")
|
||||||
for _, line := range output {
|
|
||||||
lines = append(lines, line)
|
|
||||||
}
|
|
||||||
return strings.Join(lines, "\n")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func groupBenchmarksByName(benchmarks []gtr.Benchmark) []gtr.Benchmark {
|
func groupBenchmarksByName(benchmarks []gtr.Benchmark) []gtr.Benchmark {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user