errors

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorCode

type ErrorCode int

ErrorCode represents specific error types in lanup

const (
	// ErrNoNetwork indicates no active network interface was found
	ErrNoNetwork ErrorCode = iota + 1
	// ErrInvalidConfig indicates configuration file is malformed or invalid
	ErrInvalidConfig
	// ErrFileNotFound indicates a required file was not found
	ErrFileNotFound
	// ErrPermissionDenied indicates insufficient permissions for an operation
	ErrPermissionDenied
	// ErrInvalidURL indicates the provided URL is invalid or malformed
	ErrInvalidURL
	// ErrDockerUnavailable indicates Docker is not available or not running
	ErrDockerUnavailable
)

type LanupError

type LanupError struct {
	Code    ErrorCode
	Message string
	Cause   error
}

LanupError represents a structured error with code, message, and cause

func NewError

func NewError(code ErrorCode, msg string, cause error) *LanupError

NewError creates a new LanupError with the given code, message, and optional cause

func (*LanupError) Error

func (e *LanupError) Error() string

Error implements the error interface

func (*LanupError) ExitCode

func (e *LanupError) ExitCode() int

ExitCode returns the appropriate exit code for the error

Jump to

Keyboard shortcuts

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