errdefs

package
v0.0.61 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotRoot                     = errors.New("This installer must be run with root privileges")
	ErrNetworkDetectionFailed      = errors.New("Network detection failed")
	ErrK3sInstallFailed            = NewCustomError(ErrTypeK3sInstallFailed, "")
	ErrK3sUninstallFailed          = NewCustomError(ErrTypeK3sUninstallFailed, "")
	ErrNotLinux                    = NewCustomError(ErrTypeNotLinux, "")
	ErrInvalidArchitecture         = NewCustomError(ErrTypeInvalidArchitecture, "")
	ErrDistributionDetectionFailed = NewCustomError(ErrTypeDistributionDetectionFailed, "")
	ErrUnsupportedDistribution     = NewCustomError(ErrTypeUnsupportedDistribution, "")
	ErrUnsupportedVersion          = NewCustomError(ErrTypeUnsupportedVersion, "")
	ErrUnbindInstallFailed         = NewCustomError(ErrTypeUnbindInstallFailed, "")
)

Errors

Functions

This section is empty.

Types

type CustomError

type CustomError struct {
	Type    ErrorType
	Message string
}

func NewCustomError

func NewCustomError(t ErrorType, message string) *CustomError

func (*CustomError) Error

func (e *CustomError) Error() string

func (*CustomError) Is

func (e *CustomError) Is(target error) bool

type ErrorType

type ErrorType int
const (
	ErrTypeNotLinux ErrorType = iota
	ErrTypeInvalidArchitecture
	ErrTypeDistributionDetectionFailed
	ErrTypeUnsupportedDistribution
	ErrTypeUnsupportedVersion
	ErrTypeK3sInstallFailed
	ErrTypeK3sUninstallFailed
	ErrTypeUnbindInstallFailed
)

More dynamic errors

func (ErrorType) String

func (e ErrorType) String() string

Jump to

Keyboard shortcuts

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