Version: v1.0.43 Latest Latest

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

Go to latest
Published: Dec 1, 2017 License: Apache-2.0 Imports: 1 Imported by: 0



Package err implements a threadsafe error interface. In my places, I found myself needing a lock to protect writing to a common error interface from multiple go routines (channels are great but slow). This just makes that process more convenient.



This section is empty.


This section is empty.


This section is empty.


type Error

type Error struct {
	// contains filtered or unexported fields

Error is a struct that holds an error and allows this error to be set and retrieved in a threadsafe manner.

func New

func New() *Error

New is a constructor to generate a new error object that can be set and retrieved in a threadsafe manner.

func (*Error) Get

func (e *Error) Get() error

Get will return any error associated with this structure.

func (*Error) Set

func (e *Error) Set(err error)

Set will set the error of this structure to the provided value.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL