errutil

package
v1.7.5 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleExitCoder added in v1.2.0

func HandleExitCoder(err error)

func IsErrConnectionRefused

func IsErrConnectionRefused(err error) bool

IsErrConnectionRefused return whether err is "connect: connection refused"

func IsErrHTTPResponseToHTTPSClient

func IsErrHTTPResponseToHTTPSClient(err error) bool

IsErrHTTPResponseToHTTPSClient returns whether err is "http: server gave HTTP response to HTTPS client"

Types

type ExitCodeError added in v1.2.0

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

ExitCodeError is to allow the program to exit with status code without outputting an error message.

func NewExitCoderErr added in v1.2.0

func NewExitCoderErr(exitCode int) ExitCodeError

func (ExitCodeError) Error added in v1.3.0

func (e ExitCodeError) Error() string

func (ExitCodeError) ExitCode added in v1.2.0

func (e ExitCodeError) ExitCode() int

type ExitCoder added in v1.2.0

type ExitCoder interface {
	error
	ExitCode() int
}

Jump to

Keyboard shortcuts

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