wrap

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2019 License: MIT Imports: 1 Imported by: 13

README

wrap

License Go Report Card Build Status GoDoc Release

Golang package to wrap things into a bit of context

Documentation

Overview

Package wrap contains code to simply wrap things into a bit of context.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Error

func Error(err error, context string) error

Error creates an error with additional context

func Errorf

func Errorf(err error, format string, a ...interface{}) error

Errorf creates an error with additional formatted context

Types

type ContextError

type ContextError interface {
	Context() string
	Cause() error
}

ContextError interface describes the simple type that is able to provide a textual context as well as the cause explaining the underlying error.

Jump to

Keyboard shortcuts

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