Documentation
¶
Index ¶
- func IsBranchNotFoundError(err error) bool
- func IsCommandExecutionError(err error) bool
- func IsFzfNotInstalledError(err error) bool
- func IsGitHubAPIError(err error) bool
- func IsInvalidInputError(err error) bool
- func IsNotAGitRepoError(err error) bool
- func IsNotInWorktreeError(err error) bool
- func IsWorktreeExistsError(err error) bool
- func IsWorktreeNotFoundError(err error) bool
- type BranchNotFoundError
- type CommandExecutionError
- type FzfNotInstalledError
- type GitHubAPIError
- type InvalidInputError
- type NotAGitRepoError
- type NotInWorktreeError
- type WorktreeExistsError
- type WorktreeNotFoundError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsBranchNotFoundError ¶
IsBranchNotFoundError checks if an error is a BranchNotFoundError
func IsCommandExecutionError ¶
IsCommandExecutionError checks if an error is a CommandExecutionError
func IsFzfNotInstalledError ¶
IsFzfNotInstalledError checks if an error is a FzfNotInstalledError
func IsGitHubAPIError ¶
IsGitHubAPIError checks if an error is a GitHubAPIError
func IsInvalidInputError ¶
IsInvalidInputError checks if an error is an InvalidInputError
func IsNotAGitRepoError ¶
IsNotAGitRepoError checks if an error is a NotAGitRepoError
func IsNotInWorktreeError ¶ added in v0.3.0
IsNotInWorktreeError checks if an error is a NotInWorktreeError
func IsWorktreeExistsError ¶
IsWorktreeExistsError checks if an error is a WorktreeExistsError
func IsWorktreeNotFoundError ¶
IsWorktreeNotFoundError checks if an error is a WorktreeNotFoundError
Types ¶
type BranchNotFoundError ¶
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 ¶
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 ¶
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 ¶
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
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 ¶
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