Documentation
¶
Overview ¶
Package app builds the gt command tree and its injected dependencies.
Index ¶
- func DraftPath(err error) string
- func Execute(ctx context.Context, deps Dependencies, args []string) error
- func Explain(ctx context.Context, deps Dependencies, err error) error
- func ManualCommands(page *cobra.Command) []*cobra.Command
- func ManualDate(getenv func(string) string) time.Time
- func NewRoot(deps Dependencies) *cobra.Command
- type Dependencies
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DraftPath ¶
DraftPath returns the file that holds the unsubmitted text of a failed command, or "".
func Execute ¶
func Execute(ctx context.Context, deps Dependencies, args []string) error
Execute expands aliases and executes the fresh root without printing errors.
func Explain ¶
func Explain(ctx context.Context, deps Dependencies, err error) error
Explain words a command failure for people. It adds the next step to refusals Gitea explains, and words rejected credentials, unreachable servers and expired timeouts. Exit codes are unchanged.
func ManualCommands ¶
ManualCommands lists the subcommands that get a page in the manual: the available commands, without the generated help command, and the help topics such as environment and exit-codes.
func ManualDate ¶
ManualDate dates man pages from SOURCE_DATE_EPOCH, falling back to a fixed date so the manual stays reproducible when the variable is unset.
func NewRoot ¶
func NewRoot(deps Dependencies) *cobra.Command
NewRoot builds fresh commands. Construction performs no disk, network, or Git IO.
Types ¶
type Dependencies ¶
type Dependencies struct {
Browser terminal.Browser
Editor terminal.Editor
Pager terminal.Pager
Executable func() (string, error)
Git git.Runner
Now func() time.Time
Settings *settings.Store
Credentials *auth.Store
Streams terminal.Streams
Prompter terminal.Prompter
IssueForm terminal.IssueForm
IssueEditForm terminal.IssueEditForm
PullForm terminal.PullForm
ReviewForm terminal.ReviewForm
MergeForm terminal.MergeForm
MilestoneForm terminal.MilestoneForm
ReleaseForm terminal.ReleaseForm
RepoForm terminal.RepoForm
LabelForm terminal.LabelForm
Getenv func(string) string
LookupEnv func(string) (string, bool)
Client func(string, string, bool) *transport.Client
}
Dependencies supplies external boundaries for a fresh CLI invocation.
func System ¶
func System() Dependencies
System connects the CLI to the current environment and terminal.
Source Files
¶
- action_jobs.go
- action_logs.go
- action_runs.go
- action_values.go
- actions.go
- admin_users.go
- api.go
- app.go
- args.go
- artifacts.go
- auth.go
- auth_accounts.go
- auth_login.go
- auth_status.go
- branches.go
- browse.go
- browser.go
- checkout.go
- checks.go
- comments.go
- completion.go
- config.go
- deadline.go
- deploy_keys.go
- diff_review.go
- discussion_search.go
- discussion_view.go
- doctor.go
- download.go
- editor.go
- errors.go
- git.go
- git_credentials.go
- help_topics.go
- human_output.go
- issue_attachments.go
- issue_edit.go
- issues.go
- label_export.go
- labelfile.go
- labels.go
- man.go
- metadata.go
- milestone_issues.go
- milestone_state.go
- notifications.go
- organizations.go
- packages.go
- projects.go
- prompts.go
- pull_clean.go
- pull_create.go
- pull_edit.go
- pull_mutations.go
- pull_review.go
- pull_review_lifecycle.go
- pull_review_requests.go
- pulls.go
- ref.go
- release_assets.go
- releases.go
- repo_clone.go
- repo_create.go
- repo_edit.go
- repo_migrate.go
- repo_mutations.go
- repo_sync.go
- repos.go
- search.go
- ssh_keys.go
- status.go
- target.go
- teams.go
- time.go
- timeline.go
- webhooks.go
- wiki.go