-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Description
Description
I am trying to log some custom fields in my custom logger middleware. I took the code from middleware/logger.go and tried to modify it in my own repo. I am getting EOF after I do a c.Bind()
Expected behaviour
I am expecting it work normally
Actual behaviour
I get an EOF after I add the c.Bind()
Steps to reproduce
middleware/logger.go
Working code to debug
return func(next echo.HandlerFunc) echo.HandlerFunc {
return func(c echo.Context) (err error) {
//Begin Custom Code
r1 := &Request{}
if err = c.Bind(&r1); err != nil {
fmt.Println(err)
return err
}
//End Custom code
req := c.Request()
res := c.Response()
start := time.Now()
if err = next(c); err != nil {
c.Error(err) //This is where I get an EOF. If I remove the custom code everything works perfectly
}
Am I doing something wrong?
package main
func main() {
}
Version/commit
Metadata
Metadata
Assignees
Labels
No labels