Back to

Package errors

Latest Go to latest

The latest major version is v3.

Published: Jul 10, 2020 | License: Apache-2.0 | Module:


Package errors provides convenience functions for Kivik drivers to report meaningful errors. This package is not conisidered part of the kivik public API and is subject to change without notice.

Deprecated: This package is no longer used (except by old driver implementations), and is removed in v4.


func Errorf

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

Errorf is a wrapper around pkg/errors.Errorf()

func New

func New(msg string) error

New is a wrapper around the standard errors.New, to avoid the need for multiple imports.

func Status

func Status(status int, msg string) error

Status returns a new error with the designated HTTP status.

func Statusf

func Statusf(status int, format string, args ...interface{}) error

Statusf returns a new error with the designated HTTP status.

func Wrap

func Wrap(err error, msg string) error

Wrap is a wrapper around pkg/errors.Wrap()

func WrapStatus

func WrapStatus(status int, err error) error

WrapStatus bundles an existing error with a status code.

func Wrapf

func Wrapf(err error, format string, args ...interface{}) error

Wrapf is a wrapper around pkg/errors.Wrapf()

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier