Chore: use any rather than interface{} (#74066)

This commit is contained in:
Ryan McKinley
2023-08-30 18:46:47 +03:00
committed by GitHub
parent 3e272d2bda
commit 025b2f3011
525 changed files with 2528 additions and 2528 deletions
+2 -2
View File
@@ -102,7 +102,7 @@ const (
)
// HTML renders the HTML with default template set.
func (ctx *Context) HTML(status int, name string, data interface{}) {
func (ctx *Context) HTML(status int, name string, data any) {
ctx.Resp.Header().Set(headerContentType, contentTypeHTML)
ctx.Resp.WriteHeader(status)
if err := ctx.template.ExecuteTemplate(ctx.Resp, name, data); err != nil {
@@ -113,7 +113,7 @@ func (ctx *Context) HTML(status int, name string, data interface{}) {
}
}
func (ctx *Context) JSON(status int, data interface{}) {
func (ctx *Context) JSON(status int, data any) {
ctx.Resp.Header().Set(headerContentType, contentTypeJSON)
ctx.Resp.WriteHeader(status)
enc := json.NewEncoder(ctx.Resp)