chore: remove any keywords

This commit is contained in:
kevin
2023-03-04 20:54:26 +08:00
parent 9e0e01b2bc
commit 2ea0a843f8
9 changed files with 23 additions and 23 deletions

View File

@@ -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.

View File

@@ -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" {