errors

package
v0.3.10 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsBranchNotFoundError

func IsBranchNotFoundError(err error) bool

IsBranchNotFoundError checks if an error is a BranchNotFoundError

func IsCommandExecutionError

func IsCommandExecutionError(err error) bool

IsCommandExecutionError checks if an error is a CommandExecutionError

func IsFzfNotInstalledError

func IsFzfNotInstalledError(err error) bool

IsFzfNotInstalledError checks if an error is a FzfNotInstalledError

func IsGitHubAPIError

func IsGitHubAPIError(err error) bool

IsGitHubAPIError checks if an error is a GitHubAPIError

func IsInvalidInputError

func IsInvalidInputError(err error) bool

IsInvalidInputError checks if an error is an InvalidInputError

func IsNotAGitRepoError

func IsNotAGitRepoError(err error) bool

IsNotAGitRepoError checks if an error is a NotAGitRepoError

func IsNotInWorktreeError added in v0.3.0

func IsNotInWorktreeError(err error) bool

IsNotInWorktreeError checks if an error is a NotInWorktreeError

func IsWorktreeExistsError

func IsWorktreeExistsError(err error) bool

IsWorktreeExistsError checks if an error is a WorktreeExistsError

func IsWorktreeNotFoundError

func IsWorktreeNotFoundError(err error) bool

IsWorktreeNotFoundError checks if an error is a WorktreeNotFoundError

Types

type BranchNotFoundError

type BranchNotFoundError struct {
	Branch string
	Err    error
}

BranchNotFoundError represents an error when a branch cannot be found

func NewBranchNotFoundError

func NewBranchNotFoundError(branch string, err error) *BranchNotFoundError

NewBranchNotFoundError creates a new BranchNotFoundError

func (*BranchNotFoundError) Error

func (e *BranchNotFoundError) Error() string

func (*BranchNotFoundError) Is

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

func (*BranchNotFoundError) Unwrap

func (e *BranchNotFoundError) Unwrap() error

type CommandExecutionError

type CommandExecutionError struct {
	Command string
	Args    []string
	Output  string // Combined stdout and stderr output
	Err     error
}

CommandExecutionError represents an error when executing a command

func NewCommandExecutionError

func NewCommandExecutionError(command string, args []string, output []byte, err error) *CommandExecutionError

NewCommandExecutionError creates a new CommandExecutionError with output

func (*CommandExecutionError) Error

func (e *CommandExecutionError) Error() string

func (*CommandExecutionError) Is

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

func (*CommandExecutionError) Unwrap

func (e *CommandExecutionError) Unwrap() error

type FzfNotInstalledError

type FzfNotInstalledError struct {
	Err error
}

FzfNotInstalledError represents an error when fzf is not installed

func NewFzfNotInstalledError

func NewFzfNotInstalledError(err error) *FzfNotInstalledError

NewFzfNotInstalledError creates a new FzfNotInstalledError

func (*FzfNotInstalledError) Error

func (e *FzfNotInstalledError) Error() string

func (*FzfNotInstalledError) Is

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

func (*FzfNotInstalledError) Unwrap

func (e *FzfNotInstalledError) Unwrap() error

type GitHubAPIError

type GitHubAPIError struct {
	Operation string
	Status    int
	Err       error
}

GitHubAPIError represents an error from the GitHub API

func NewGitHubAPIError

func NewGitHubAPIError(operation string, status int, err error) *GitHubAPIError

NewGitHubAPIError creates a new GitHubAPIError

func (*GitHubAPIError) Error

func (e *GitHubAPIError) Error() string

func (*GitHubAPIError) Is

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

func (*GitHubAPIError) Unwrap

func (e *GitHubAPIError) Unwrap() error

type InvalidInputError

type InvalidInputError struct {
	Input  string
	Reason string
	Err    error
}

InvalidInputError represents an error when user input is invalid

func NewInvalidInputError

func NewInvalidInputError(input, reason string, err error) *InvalidInputError

NewInvalidInputError creates a new InvalidInputError

func (*InvalidInputError) Error

func (e *InvalidInputError) Error() string

func (*InvalidInputError) Is

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

func (*InvalidInputError) Unwrap

func (e *InvalidInputError) Unwrap() error

type NotAGitRepoError

type NotAGitRepoError struct {
	Path string
	Err  error
}

NotAGitRepoError represents an error when a directory is not a git repository

func NewNotAGitRepoError

func NewNotAGitRepoError(path string, err error) *NotAGitRepoError

NewNotAGitRepoError creates a new NotAGitRepoError

func (*NotAGitRepoError) Error

func (e *NotAGitRepoError) Error() string

func (*NotAGitRepoError) Is

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

func (*NotAGitRepoError) Unwrap

func (e *NotAGitRepoError) Unwrap() error

type NotInWorktreeError added in v0.3.0

type NotInWorktreeError struct {
	Path string
	Err  error
}

NotInWorktreeError represents an error when the current directory is not in a worktree

func NewNotInWorktreeError added in v0.3.0

func NewNotInWorktreeError(path string, err error) *NotInWorktreeError

NewNotInWorktreeError creates a new NotInWorktreeError

func (*NotInWorktreeError) Error added in v0.3.0

func (e *NotInWorktreeError) Error() string

func (*NotInWorktreeError) Is added in v0.3.0

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

func (*NotInWorktreeError) Unwrap added in v0.3.0

func (e *NotInWorktreeError) Unwrap() error

type WorktreeExistsError

type WorktreeExistsError struct {
	Path   string
	Branch string
	Err    error
}

WorktreeExistsError represents an error when a worktree already exists

func NewWorktreeExistsError

func NewWorktreeExistsError(path, branch string, err error) *WorktreeExistsError

NewWorktreeExistsError creates a new WorktreeExistsError

func (*WorktreeExistsError) Error

func (e *WorktreeExistsError) Error() string

func (*WorktreeExistsError) Is

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

func (*WorktreeExistsError) Unwrap

func (e *WorktreeExistsError) Unwrap() error

type WorktreeNotFoundError

type WorktreeNotFoundError struct {
	Identifier string // Can be a branch name, path suffix, or directory name
	Err        error
}

WorktreeNotFoundError represents an error when a worktree cannot be found

func NewWorktreeNotFoundError

func NewWorktreeNotFoundError(identifier string, err error) *WorktreeNotFoundError

NewWorktreeNotFoundError creates a new WorktreeNotFoundError

func (*WorktreeNotFoundError) Error

func (e *WorktreeNotFoundError) Error() string

func (*WorktreeNotFoundError) Is

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

func (*WorktreeNotFoundError) Unwrap

func (e *WorktreeNotFoundError) Unwrap() error

Jump to

Keyboard shortcuts

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