Documentation
¶
Overview ¶
Package errors provides user-friendly error helpers for the wtp CLI.
Index ¶
- func BranchNameRequired(commandExample string) error
- func BranchNotFound(branchName string) error
- func BranchRemovalFailed(branchName string, gitError error, isForced bool) error
- func CannotRemoveCurrentWorktree(worktreeName, path string) error
- func ConfigAlreadyExists(configPath string) error
- func ConfigLoadFailed(configPath string, parseError error) error
- func DirectoryAccessFailed(operation, path string, originalError error) error
- func GitCommandFailed(command, output string) error
- func HookExecutionFailed(hookIndex int, hookType string, originalError error) error
- func InvalidBranchName(branchName string) error
- func MultipleBranchesFound(branchName string, remotes []string) error
- func NotInGitRepository() error
- func ShellIntegrationRequired() error
- func UnsupportedShell(shell string, supportedShells []string) error
- func WorktreeCreationFailed(path, branch string, gitError error) error
- func WorktreeNameRequiredForRemove() error
- func WorktreeNotFound(name string, availableWorktrees []string) error
- func WorktreeRemovalFailed(path string, gitError error) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BranchNameRequired ¶
BranchNameRequired reports that a branch name argument is missing.
func BranchNotFound ¶
BranchNotFound reports that a branch cannot be found locally or remotely.
func BranchRemovalFailed ¶
BranchRemovalFailed wraps errors that occur when deleting a git branch.
func CannotRemoveCurrentWorktree ¶
CannotRemoveCurrentWorktree indicates the user is trying to delete the active worktree.
func ConfigAlreadyExists ¶
ConfigAlreadyExists indicates that a configuration file already exists at the target path.
func ConfigLoadFailed ¶
ConfigLoadFailed reports a failure to read or parse the configuration file.
func DirectoryAccessFailed ¶
DirectoryAccessFailed reports errors encountered while interacting with a directory path.
func GitCommandFailed ¶
GitCommandFailed wraps an error from a git command with the command and output details.
func HookExecutionFailed ¶
HookExecutionFailed wraps an error that occurred while executing a configured hook.
func InvalidBranchName ¶
InvalidBranchName reports that the provided branch name violates git naming rules.
func MultipleBranchesFound ¶
MultipleBranchesFound reports that a branch name matches multiple remotes and needs a track specifier.
func NotInGitRepository ¶
func NotInGitRepository() error
NotInGitRepository returns an error indicating the command must run inside a Git repository.
func ShellIntegrationRequired ¶
func ShellIntegrationRequired() error
ShellIntegrationRequired indicates shell integration is needed for the requested command.
func UnsupportedShell ¶
UnsupportedShell reports that the requested shell is not supported for integration.
func WorktreeCreationFailed ¶
WorktreeCreationFailed wraps a git error encountered while creating a worktree.
func WorktreeNameRequiredForRemove ¶
func WorktreeNameRequiredForRemove() error
WorktreeNameRequiredForRemove reports that a worktree name is required for removal.
func WorktreeNotFound ¶
WorktreeNotFound returns an error when the requested worktree is not present.
func WorktreeRemovalFailed ¶
WorktreeRemovalFailed returns a descriptive error when a worktree cannot be removed.
Types ¶
This section is empty.