diff --git a/.golangci.yml b/.golangci.yml index 3ef22c9e84..50b6c3d54f 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -191,7 +191,7 @@ linters: # - gosmopolitan # TODO https://github.com/gofiber/fiber/issues/2816 - govet - grouper - # - inamedparam # TODO https://github.com/gofiber/fiber/issues/2816 + - inamedparam - loggercheck # - mirror # TODO https://github.com/gofiber/fiber/issues/2816 - misspell diff --git a/bind.go b/bind.go index ab3594944f..0c9a63c4a8 100644 --- a/bind.go +++ b/bind.go @@ -9,13 +9,13 @@ import ( type CustomBinder interface { Name() string MIMETypes() []string - Parse(Ctx, any) error + Parse(c Ctx, out any) error } // An interface to register custom struct validator for binding. type StructValidator interface { Engine() any - ValidateStruct(any) error + ValidateStruct(out any) error } // Bind struct diff --git a/ctx.go b/ctx.go index d58ef263b7..5421674276 100644 --- a/ctx.go +++ b/ctx.go @@ -105,7 +105,7 @@ type Cookie struct { // Views is the interface that wraps the Render function. type Views interface { Load() error - Render(io.Writer, string, any, ...string) error + Render(out io.Writer, name string, binding any, layout ...string) error } // ResFmt associates a Content Type to a fiber.Handler for c.Format diff --git a/log/log.go b/log/log.go index 11698135cf..9d9cd8b0d2 100644 --- a/log/log.go +++ b/log/log.go @@ -54,8 +54,8 @@ type CommonLogger interface { // ControlLogger provides methods to config a logger. type ControlLogger interface { - SetLevel(Level) - SetOutput(io.Writer) + SetLevel(level Level) + SetOutput(w io.Writer) } // AllLogger is the combination of Logger, FormatLogger, CtxLogger and ControlLogger.