errorx

package
v3.0.0-...-7ba4d6b Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2024 License: Apache-2.0, BSD-3-Clause, MIT 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