Echo return function


Hi, I new with golang and I little understand about func and method. But in echo example I’m confusing why always I see the error as return? Can anyone explain it to me?
For example :

e.GET("/", func(c echo.Context) error {
  return c.String(http.StatusOK, "Hello, World!")

Thanks in advance :slight_smile:

Why HandlerFunc function only returns the error interface?

The is the handler signature for Echo. The returned error is handled by a centralized http error handler.