shark

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2018 License: MIT Imports: 10 Imported by: 0

README

Shark

Shark is a set of tools for handling errors and panics in Go.

Installation

go get -u github.com/Kamva/shark

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CaptureRoutineException

func CaptureRoutineException(exceptions exceptions.AggregatedRoutineException)

func ErrorRenderer

func ErrorRenderer() context.Handler

ErrorRenderer renders errors and exception in json format

func ErrorReporter

func ErrorReporter() context.Handler

ErrorReporter creates and returns a new error reporter middleware.

Types

type ErrorBag

type ErrorBag struct {
	// contains filtered or unexported fields
}

ErrorBag is a error container

func (ErrorBag) Append

func (b ErrorBag) Append(key string, value string)

Append add new error for key

func (ErrorBag) GetErrors

func (b ErrorBag) GetErrors() map[string][]string

GetErrors returns all errors of all keys

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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