errors

package
v0.1.24 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: MIT 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.

Jump to

Keyboard shortcuts

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