internals: core/router/api_builder_benchmark_test.go: replace the strings.Builder(go 1.10+) with the bytes.Buffer, it is a test so we are ok let it build and run for go1.10- as well

Former-commit-id: a531db90fe02fd327e12ecc20128090e18b3dbcb
This commit is contained in:
Gerasimos (Makis) Maropoulos 2018-08-07 13:05:32 +03:00
parent 55e4cf038e
commit 43fd73eab9

View File

@ -1,6 +1,7 @@
package router package router
import ( import (
"bytes"
"math/rand" "math/rand"
"strings" "strings"
"testing" "testing"
@ -44,7 +45,8 @@ func randStringBytesMaskImprSrc(n int) string {
// END. // END.
func genPaths(routesLength, minCharLength, maxCharLength int) []string { func genPaths(routesLength, minCharLength, maxCharLength int) []string {
b := new(strings.Builder) // b := new(strings.Builder)
b := new(bytes.Buffer)
paths := make([]string, routesLength) paths := make([]string, routesLength)
pathStart := '/' pathStart := '/'
for i := 0; i < routesLength; i++ { for i := 0; i < routesLength; i++ {