chore: update to go1.19
This commit is contained in:
parent
40d2421db9
commit
45453b20fa
61 changed files with 519 additions and 493 deletions
|
@ -827,7 +827,7 @@ func BenchmarkRouterServe(b *testing.B) {
|
|||
b.Cleanup(func() { server.Close() })
|
||||
|
||||
res := &http.Response{
|
||||
StatusCode: 200,
|
||||
StatusCode: http.StatusOK,
|
||||
Body: io.NopCloser(strings.NewReader("")),
|
||||
}
|
||||
|
||||
|
@ -879,7 +879,7 @@ func BenchmarkRouterServe(b *testing.B) {
|
|||
|
||||
func BenchmarkService(b *testing.B) {
|
||||
res := &http.Response{
|
||||
StatusCode: 200,
|
||||
StatusCode: http.StatusOK,
|
||||
Body: io.NopCloser(strings.NewReader("")),
|
||||
}
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ import (
|
|||
"io"
|
||||
"net"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
|
@ -109,8 +110,13 @@ func Test_Routing(t *testing.T) {
|
|||
for {
|
||||
conn, err := tcpBackendListener.Accept()
|
||||
if err != nil {
|
||||
var netErr net.Error
|
||||
if errors.As(err, &netErr) && netErr.Temporary() {
|
||||
var opErr *net.OpError
|
||||
if errors.As(err, &opErr) && opErr.Temporary() {
|
||||
continue
|
||||
}
|
||||
|
||||
var urlErr *url.Error
|
||||
if errors.As(err, &urlErr) && urlErr.Temporary() {
|
||||
continue
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue