Skip to content

Commit

Permalink
Convert to string using rune() (#443)
Browse files Browse the repository at this point in the history
See golang/go#32479

Fix #442.

Signed-off-by: Robert-André Mauchin <zebob.m@gmail.com>
  • Loading branch information
eclipseo authored and ernest committed Aug 19, 2020
1 parent eec5482 commit da1e29d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions bench_curly_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit da1e29d

Please sign in to comment.