errors

package
Version: v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2021 License: CC0-1.0, CC0-1.0 Imports: 1 Imported by: 2

Documentation

Index

Constants

View Source
const (
	InvalidPath = Code(iota)
	Exist
	NotExist
	DirNotEmpty
	NotFile
	NotDirectory
	HashNotAvailable
)

The valid error codes.

Variables

This section is empty.

Functions

This section is empty.

Types

type Code

type Code int

Code represents an fs error.

func (Code) Code

func (c Code) Code() Code

Code returns the code for the error c.

func (Code) Error

func (c Code) Error() string

String returns a description of the error with error code c.

type Error

type Error interface {
	// Code returns the code associated with this error.
	Code() Code
	// Error returns a string description of the error.
	Error() string
}

Error is the interface satisfied by an error with a Code.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL