Documentation
¶
Index ¶
- func CreateFromBranch(ctx context.Context, gitSvc gitService, cfg *config.AppConfig, ...) (string, error)
- func CreateFromBranchWithFS(ctx context.Context, gitSvc gitService, cfg *config.AppConfig, ...) (string, error)
- func CreateFromPR(ctx context.Context, gitSvc gitService, cfg *config.AppConfig, prNumber int, ...) (string, error)
- func CreateFromPRWithFS(ctx context.Context, gitSvc gitService, cfg *config.AppConfig, prNumber int, ...) (string, error)
- func DeleteWorktree(ctx context.Context, gitSvc gitService, cfg *config.AppConfig, ...) error
- type OSFilesystem
- type RealFilesystem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateFromBranch ¶
func CreateFromBranch(ctx context.Context, gitSvc gitService, cfg *config.AppConfig, branchName, worktreeName string, withChange, silent bool) (string, error)
CreateFromBranch creates a worktree from a branch name.
func CreateFromBranchWithFS ¶ added in v1.30.0
func CreateFromBranchWithFS(ctx context.Context, gitSvc gitService, cfg *config.AppConfig, branchName, worktreeName string, withChange, silent bool, fs OSFilesystem) (string, error)
CreateFromBranchWithFS creates a worktree from a branch name using the provided filesystem.
func CreateFromPR ¶
func CreateFromPR(ctx context.Context, gitSvc gitService, cfg *config.AppConfig, prNumber int, silent bool) (string, error)
CreateFromPR creates a worktree from a PR number.
Types ¶
type OSFilesystem ¶ added in v1.30.0
type OSFilesystem interface {
Stat(name string) (os.FileInfo, error)
MkdirAll(path string, perm os.FileMode) error
Getwd() (string, error)
}
OSFilesystem abstracts filesystem operations for dependency injection.
var DefaultFS OSFilesystem = RealFilesystem{}
DefaultFS is the default filesystem implementation using the real os package.
type RealFilesystem ¶ added in v1.30.0
type RealFilesystem struct{}
RealFilesystem implements OSFilesystem using the real os package.
func (RealFilesystem) Getwd ¶ added in v1.30.0
func (RealFilesystem) Getwd() (string, error)
Getwd wraps os.Getwd.
Click to show internal directories.
Click to hide internal directories.