func handler(c echo.Context) error { // Render an HTML Template return c.Render(http.StatusOK, "index.html", map[string]interface{}{"title": "Echo"}) }
func handler1(c echo.Context) error { // Render a JSON response return c.JSON(http.StatusOK, map[string]interface{}{"message": "Hello, world!"}) }In this example, `c.JSON` method is used to render a JSON response with status code 200. Overall, the `Context.Render` package is used to render output responses in various formats using a variety of engines. It's a useful package for any Go developer building web applications or APIs.