mirror of
https://github.com/kataras/iris.git
synced 2025-01-23 18:51:03 +01:00
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:
parent
55e4cf038e
commit
43fd73eab9
|
@ -1,6 +1,7 @@
|
|||
package router
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"math/rand"
|
||||
"strings"
|
||||
"testing"
|
||||
|
@ -44,7 +45,8 @@ func randStringBytesMaskImprSrc(n int) string {
|
|||
// END.
|
||||
|
||||
func genPaths(routesLength, minCharLength, maxCharLength int) []string {
|
||||
b := new(strings.Builder)
|
||||
// b := new(strings.Builder)
|
||||
b := new(bytes.Buffer)
|
||||
paths := make([]string, routesLength)
|
||||
pathStart := '/'
|
||||
for i := 0; i < routesLength; i++ {
|
||||
|
|
Loading…
Reference in New Issue
Block a user