Documentation
¶
Overview ¶
Package cmd implements all CLI commands for the work tool.
External capabilities (network, filesystem, terminal) are injected via the Deps struct. Production code uses NewDeps(); tests construct their own via newTestDeps(t) and override individual fields. This makes tests independent and safe for parallel execution.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Deps ¶ added in v1.4.0
type Deps struct {
IsInteractive func() bool
AutoUpdate func(context.Context, cache.UpdateConfig, *cache.Cache, cache.UpdateOptions) (*cache.Cache, error)
SelectRepo func([]cache.SearchResult, string) (*cache.Repo, bool)
OpenURL func(string) error
OpenFile func(string) error
EditFile func(string) error
SyncRepo func(string) git.SyncResult
GhAuthLogin func(string) error
DetectToken func(string) (*auth.Token, error)
GhAuthLogout func(string) error
PromptWorkDir func(string) (string, error)
PromptConfirm func(string) (bool, error)
SelectDomain func([]string) (string, error)
SelectOrgs func([]string, []string) ([]string, error)
ListOrgs func(string, string) ([]string, error)
RunAboutProgram func(string) error
PickAboutStyle func() aboutStyle
}
Deps holds all external capabilities that command handlers need. Production code uses NewDeps(); tests construct their own with safe-for-tests defaults via TestDeps(t) and override individual fields.
Click to show internal directories.
Click to hide internal directories.