errbubble

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExitCode

func ExitCode(err error) int

func HTTPStatusCode

func HTTPStatusCode(err error) int

func Swallow

func Swallow(err error, target error) error

Types

type Bubble

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

func New

func New(err error, opts ...BubbleOpt) (b *Bubble)

func (*Bubble) ExitCode

func (b *Bubble) ExitCode() int

func (*Bubble) HTTPStatusCode

func (b *Bubble) HTTPStatusCode() int

type BubbleOpt

type BubbleOpt func(*Bubble)

func WithExitCode

func WithExitCode(exitCode int) BubbleOpt

func WithHTTPStatusCode

func WithHTTPStatusCode(statusCode int) BubbleOpt

type ExitCoder

type ExitCoder interface {
	ExitCode() int
}

type HTTPStatusCoder

type HTTPStatusCoder interface {
	HTTPStatusCode() int
}

Jump to

Keyboard shortcuts

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