chore: remove any keywords
This commit is contained in:
@@ -30,7 +30,7 @@ var (
|
||||
// Validator defines the interface for validating the request.
|
||||
type Validator interface {
|
||||
// Validate validates the request and parsed data.
|
||||
Validate(r *http.Request, data any) error
|
||||
Validate(r *http.Request, data interface{}) error
|
||||
}
|
||||
|
||||
// Parse parses the request.
|
||||
|
||||
@@ -400,7 +400,7 @@ func BenchmarkParseAuto(b *testing.B) {
|
||||
|
||||
type mockValidator struct{}
|
||||
|
||||
func (m mockValidator) Validate(r *http.Request, data any) error {
|
||||
func (m mockValidator) Validate(r *http.Request, data interface{}) error {
|
||||
if r.URL.Path == "/a" {
|
||||
val := reflect.ValueOf(data).Elem().FieldByName("Name").String()
|
||||
if val != "hello" {
|
||||
|
||||
Reference in New Issue
Block a user