Skip to content

Commit

Permalink
remove execute functions
Browse files Browse the repository at this point in the history
  • Loading branch information
crhntr committed Feb 8, 2025
1 parent a4dd0ef commit 7fb313d
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions internal/muxt/routes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -688,8 +688,6 @@ type (
)
func (T) F(form In) int { return 0 }
func execute(response http.ResponseWriter, request *http.Request, writeHeader bool, name string, code int, data any) {}
`,
Receiver: "T",
ExpectedError: "failed to generate parse statements for form field href: unsupported type: url.URL",
Expand Down Expand Up @@ -961,8 +959,6 @@ package main
type T struct{}
func (T) F(string) any {return nil}
func execute(response http.ResponseWriter, request *http.Request, writeHeader bool, name string, code int, data any) {}
`,

ExpectedError: "handler func F(string) any expects 1 arguments but call F() has 0",
Expand All @@ -982,8 +978,6 @@ import (
type T struct{}
func (T) F(context.Context) any {return nil}
func execute(response http.ResponseWriter, request *http.Request, writeHeader bool, name string, code int, data any) {}
`,
ExpectedError: "handler func F(context.Context) any expects 1 arguments but call F(ctx, name) has 2",
},
Expand All @@ -1002,8 +996,6 @@ import (
type T struct{}
func (T) F(string) any {return nil}
func execute(response http.ResponseWriter, request *http.Request, writeHeader bool, name string, code int, data any) {}
`,
ExpectedError: "method expects type string but request is *http.Request",
},
Expand All @@ -1019,8 +1011,6 @@ import "net/http"
type T struct{}
func (T) F(string) any {return nil}
func execute(response http.ResponseWriter, request *http.Request, writeHeader bool, name string, code int, data any) {}
`,
ExpectedError: "method expects type string but ctx is context.Context",
},
Expand All @@ -1036,8 +1026,6 @@ import "net/http"
type T struct{}
func (T) F(string) any {return nil}
func execute(response http.ResponseWriter, request *http.Request, writeHeader bool, name string, code int, data any) {}
`,
ExpectedError: "method expects type string but response is http.ResponseWriter",
},
Expand Down Expand Up @@ -1067,8 +1055,6 @@ import "net/http"
type T struct{}
func (T) F(float64) any {return nil}
func execute(response http.ResponseWriter, request *http.Request, writeHeader bool, name string, code int, data any) {}
`,
ExpectedError: "method param type float64 not supported",
},
Expand All @@ -1084,8 +1070,6 @@ import "net/http"
type T struct{}
func (T) F(*T) any {return nil}
func execute(response http.ResponseWriter, request *http.Request, writeHeader bool, name string, code int, data any) {}
`,
ExpectedError: "method expects type *T but request is *http.Request",
},
Expand All @@ -1104,8 +1088,6 @@ import (
type T struct{}
func (T) F(context.Context, string, string) any {return nil}
func execute(response http.ResponseWriter, request *http.Request, writeHeader bool, name string, code int, data any) {}
`,
ExpectedError: "method expects type string but request is *http.Request",
},
Expand Down

0 comments on commit 7fb313d

Please sign in to comment.