shoutrrr: github.com/containrrr/shoutrrr/internal/failures Index | Files

package failures

import "github.com/containrrr/shoutrrr/internal/failures"

Index

Package Files

failure.go

func IsTestSetupFailure Uses

func IsTestSetupFailure(f Failure) (string, bool)

IsTestSetupFailure checks whether the given failure is due to the test setup being broken

type Failure Uses

type Failure interface {
    error
    ID() FailureID
}

Failure is an extended error that also includes an ID to be used to identify a specific error

func Wrap Uses

func Wrap(message string, id FailureID, wrappedError error, v ...interface{}) Failure

Wrap returns a failure with the given message and id, saving the message of wrappedError for appending to Error()

type FailureID Uses

type FailureID int

FailureID is a number to be used to identify a specific error

const (
    // FailTestSetup is FailureID used to represent an error that is part of the setup for tests
    FailTestSetup FailureID = -1
)

Package failures imports 1 packages (graph) and is imported by 1 packages. Updated 2019-08-02. Refresh now. Tools for package owners.