error

package
v0.0.0-...-9c41f32 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrObjectExists indicates a specified object already exists.
	ErrObjectExists = fmt.Errorf("object already exists")

	// ErrObjectIsNewer indicates a specified object is newer or same age.
	ErrObjectIsNewer = fmt.Errorf("object is newer or same age")

	// ErrObjectSizesMatch indicates the sizes of objects match.
	ErrObjectSizesMatch = fmt.Errorf("object size matches")

	// ErrObjectIsNewerAndSizesMatch indicates the specified object is newer or same age and sizes of objects match.
	ErrObjectIsNewerAndSizesMatch = fmt.Errorf("%v and %v", ErrObjectIsNewer, ErrObjectSizesMatch)
)

Functions

func IsCancelation

func IsCancelation(err error) bool

IsCancelation reports whether if given error is a cancelation error.

func IsWarning

func IsWarning(err error) bool

IsWarning checks if given error is either ErrObjectExists, ErrObjectIsNewer or ErrObjectSizesMatch.

Types

type Error

type Error struct {
	// Op is the operation being performed, usually the name of the method
	// being invoked (copy, move, etc.)
	Op string
	// Src is the source argument
	Src *url.URL
	// Dst is the destination argument
	Dst *url.URL
	// The underlying error if any
	Err error
}

Error is the type that implements error interface.

func (*Error) Error

func (e *Error) Error() string

Error implements the error interface.

func (*Error) FullCommand

func (e *Error) FullCommand() string

FullCommand returns the command string that occurred at.

func (*Error) Unwrap

func (e *Error) Unwrap() error

Unwrap unwraps the error.

Jump to

Keyboard shortcuts

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