errors

package
v2.0.4 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2026 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package errors provides error handling utilities with colored terminal output for the CLI.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDirectoryInaccessibleError

func NewDirectoryInaccessibleError(err error) error

NewDirectoryInaccessibleError creates an error for when a directory cannot be accessed.

func NewNotADirectoryError

func NewNotADirectoryError(path string) error

NewNotADirectoryError creates an error for when a path is not a directory.

func NewPathNotSpecifiedError

func NewPathNotSpecifiedError() error

NewPathNotSpecifiedError creates an error for when a path is not specified.

Types

type ErrorType

type ErrorType int
const (
	TypeHint ErrorType = iota
	TypeError
)

func (ErrorType) IsFatalError

func (et ErrorType) IsFatalError() bool

IsFatalError returns true if the error type is fatal and should cause the program to exit.

type InputDirectoryError

type InputDirectoryError struct {
	Type ErrorType
	Msg  string
}

func (*InputDirectoryError) Error

func (e *InputDirectoryError) Error() string

Error implements the error interface.

func (*InputDirectoryError) HandlerString

func (e *InputDirectoryError) HandlerString() string

HandlerString returns a colored error string for CLI display.

Jump to

Keyboard shortcuts

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