errorx

package
v2.24.0-RC1+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package errorx contains utilities for handling errors.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GuardedError

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

GuardedError is a concurrency-safe error wrapper. It is sticky in that the first error won't be overwritten.

func (*GuardedError) Error

func (g *GuardedError) Error() error

Error returns the guarded error.

func (*GuardedError) TrySetError

func (g *GuardedError) TrySetError(err error) bool

TrySetError sets the error, if not already set. Returns true iff the error was set.

Jump to

Keyboard shortcuts

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