errorlib

package
v0.0.0-...-2c24670 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package errorlib contains tools to deal with errors, including the heavily-used `ErrorString` type (for errors that are compile-time constants) and `LoggedChannel` function (to report non-fatal errors during concurrent execution)

Index

Constants

This section is empty.

Variables

View Source
var Errors = make(chan error)

Errors is the default error channel used by functions in this package.

Functions

func Flatten

func Flatten(errs []error) error

Flatten a slice of errors into a single error

func LoggedChannel

func LoggedChannel() chan error

LoggedChannel creates an error channel that will automatically log errors sent to it to the logger specified in kit/log.

Types

type ErrorString

type ErrorString string

ErrorString is a string with an Error() method. This lets you declare errors as visible compile-time constants, which facilitates various IDE tools.

func (ErrorString) Error

func (err ErrorString) Error() string

Jump to

Keyboard shortcuts

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