Answers for "custom echo golang middleware"

Go
0

custom echo golang middleware

e.Use(CustomeMiddleware)

// CustomeMiddleware has the access of request object
// and we can decide if we want to go ahead with the req
func CustomeMiddleware() echo.MiddlewareFunc {
	return func(next echo.HandlerFunc) echo.HandlerFunc {
		return func(c echo.Context) error {
			//do the things
		}

		return next(c)
	}
}
Posted by: Guest on September-07-2021

Browse Popular Code Answers by Language