mirror of
https://github.com/strukturag/nextcloud-spreed-signaling
synced 2026-03-14 14:35:44 +01:00
Use strings.Builder instead of looped string concatenation.
This commit is contained in:
parent
697f659083
commit
e761ea071b
1 changed files with 3 additions and 3 deletions
|
|
@ -77,18 +77,18 @@ func checkStatsValue(t *testing.T, collector prometheus.Collector, value float64
|
|||
|
||||
pc = pc[:n]
|
||||
frames := runtime.CallersFrames(pc)
|
||||
stack := ""
|
||||
var stack strings.Builder
|
||||
for {
|
||||
frame, more := frames.Next()
|
||||
if !strings.Contains(frame.File, "nextcloud-spreed-signaling") {
|
||||
break
|
||||
}
|
||||
stack += fmt.Sprintf("%s:%d\n", frame.File, frame.Line)
|
||||
fmt.Fprintf(&stack, "%s:%d\n", frame.File, frame.Line)
|
||||
if !more {
|
||||
break
|
||||
}
|
||||
}
|
||||
assert.EqualValues(value, v, "Unexpected value for %s at\n%s", desc, stack)
|
||||
assert.EqualValues(value, v, "Unexpected value for %s at\n%s", desc, stack.String())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue