Update to go1.22
Co-authored-by: Julien Salleyron <julien.salleyron@gmail.com>
This commit is contained in:
parent
e11ff98608
commit
d5cb9b50f4
56 changed files with 4189 additions and 3419 deletions
|
@ -25,6 +25,8 @@ import (
|
|||
"github.com/traefik/traefik/v2/pkg/types"
|
||||
)
|
||||
|
||||
const delta float64 = 1e-10
|
||||
|
||||
var (
|
||||
logFileNameSuffix = "/traefik/logger/test.log"
|
||||
testContent = "Hello, World"
|
||||
|
@ -278,7 +280,7 @@ func assertFloat64(exp float64) func(t *testing.T, actual interface{}) {
|
|||
return func(t *testing.T, actual interface{}) {
|
||||
t.Helper()
|
||||
|
||||
assert.Equal(t, exp, actual)
|
||||
assert.InDelta(t, exp, actual, delta)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ package addprefix
|
|||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"errors"
|
||||
"net/http"
|
||||
|
||||
"github.com/opentracing/opentracing-go/ext"
|
||||
|
@ -35,7 +35,7 @@ func New(ctx context.Context, next http.Handler, config dynamic.AddPrefix, name
|
|||
name: name,
|
||||
}
|
||||
} else {
|
||||
return nil, fmt.Errorf("prefix cannot be empty")
|
||||
return nil, errors.New("prefix cannot be empty")
|
||||
}
|
||||
|
||||
return result, nil
|
||||
|
|
|
@ -298,7 +298,7 @@ func TestNewResponseRecorder(t *testing.T) {
|
|||
t.Parallel()
|
||||
|
||||
rec := newCodeModifier(test.rw, 0)
|
||||
assert.IsType(t, rec, test.expected)
|
||||
assert.IsType(t, test.expected, rec)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue