From da1e29df69cae32f2f444cbdbbddb1bfeb53a9ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= <30413512+eclipseo@users.noreply.github.com> Date: Mon, 27 Jul 2020 17:02:05 +0200 Subject: [PATCH] Convert to string using rune() (#443) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/golang/go/issues/32479 Fix #442. Signed-off-by: Robert-André Mauchin --- bench_curly_test.go | 4 ++-- bench_test.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bench_curly_test.go b/bench_curly_test.go index db6a1a75..30649a78 100644 --- a/bench_curly_test.go +++ b/bench_curly_test.go @@ -14,10 +14,10 @@ func setupCurly(container *Container) []string { container.Router(CurlyRouter{}) for i := 0; i < wsCount; i++ { - root := fmt.Sprintf("/%s/{%s}/", string(i+97), string(i+97)) + root := fmt.Sprintf("/%s/{%s}/", string(rune(i+97)), string(rune(i+97))) ws := new(WebService).Path(root) for j := 0; j < rtCount; j++ { - sub := fmt.Sprintf("/%s2/{%s2}", string(j+97), string(j+97)) + sub := fmt.Sprintf("/%s2/{%s2}", string(rune(j+97)), string(rune(j+97))) ws.Route(ws.GET(sub).Consumes("application/xml").Produces("application/xml").To(echoCurly)) } container.Add(ws) diff --git a/bench_test.go b/bench_test.go index 3e77c2d2..5380abfb 100644 --- a/bench_test.go +++ b/bench_test.go @@ -13,10 +13,10 @@ func setup(container *Container) { rtCount := 26 for i := 0; i < wsCount; i++ { - root := fmt.Sprintf("/%s/{%s}/", string(i+97), string(i+97)) + root := fmt.Sprintf("/%s/{%s}/", string(rune(i+97)), string(rune(i+97))) ws := new(WebService).Path(root) for j := 0; j < rtCount; j++ { - sub := fmt.Sprintf("/%s2/{%s2}", string(j+97), string(j+97)) + sub := fmt.Sprintf("/%s2/{%s2}", string(rune(j+97)), string(rune(j+97))) ws.Route(ws.GET(sub).To(echo)) } container.Add(ws)