echo

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 15, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package echo has functions to use with echo (https://echo.labstack.com).

import ctxecho "github.com/mvndaai/ctxerr/http/echo"

func main() {
	...
	e.HTTPErrorHandler = ctxecho.ErrorHandler(config.ShowMessage, config.ShowFields)
	...
}

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorHandler

func ErrorHandler(showMessage, showFields bool) func(err error, c echo.Context)

ErrorHandler implements an echo Custom HTTP Error Handler. This uses the ctxerr/http package to return a standardized response. See https://echo.labstack.com/guide/error-handling for more information on error handlers.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL