hooks

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 24, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHooksCmd

func NewHooksCmd(deps Deps) *cobra.Command

NewHooksCmd builds the `da hooks` command tree from injected dependencies.

Types

type Deps

type Deps struct {
	Flags              GlobalFlags
	ErrorWithHints     func(message string, hints ...string) error
	UsageError         func(message string, hints ...string) error
	MaxArgsWithHints   func(n int, hints ...string) cobra.PositionalArgs
	ExactArgsWithHints func(n int, hints ...string) cobra.PositionalArgs
	// Resolver is the hook-spec resolution seam. Nil in production wiring
	// (a real defaultHookSpecResolver is used); tests inject a fake to
	// drive the resolve-then-validate error paths in runHooksRemove.
	Resolver hookSpecResolver
}

Deps carries UX helpers from commands without an import cycle.

type GlobalFlags

type GlobalFlags struct {
	DryRun bool
	Yes    bool
	Force  bool
}

GlobalFlags mirrors the subset of commands.Flags used by hooks subcommands.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL