fix go 1.15 errors (#5277)

## Description

fix golang 1.15 errors. 

Closes: #XXX
This commit is contained in:
Marko
2020-08-24 14:26:05 +02:00
committed by GitHub
parent 7d3335d526
commit a6032f4183
3 changed files with 4 additions and 4 deletions

View File

@@ -60,10 +60,10 @@ func TestContains(t *testing.T) {
func BenchmarkCMapHas(b *testing.B) {
m := NewCMap()
for i := 0; i < 1000; i++ {
m.Set(string(i), i)
m.Set(string(rune(i)), i)
}
b.ResetTimer()
for i := 0; i < b.N; i++ {
m.Has(string(i))
m.Has(string(rune(i)))
}
}

View File

@@ -444,7 +444,7 @@ func benchmarkNClients(n int, b *testing.B) {
err = s.PublishWithEvents(
ctx,
"Gamora",
map[string][]string{"abci.Account.Owner": {"Ivan"}, "abci.Invoices.Number": {string(i)}},
map[string][]string{"abci.Account.Owner": {"Ivan"}, "abci.Invoices.Number": {string(rune(i))}},
)
require.NoError(b, err)
}

View File

@@ -209,7 +209,7 @@ func getServiceURL(rootURL string) (url, urnDomain string, err error) {
defer r.Body.Close()
if r.StatusCode >= 400 {
err = errors.New(string(r.StatusCode))
err = errors.New(string(rune(r.StatusCode)))
return
}
var root Root