Documentation
¶
Overview ¶
Package root provides the top-level gro command and global flags.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecuteContext ¶ added in v1.0.35
ExecuteContext runs the root command with the given context. os.Exit stays strictly AFTER runRoot returns so runRoot's deferred FlushMigrationNotice is never skipped by the exit (it would be if the defer lived here).
func WireBackendSelection ¶ added in v1.0.53
WireBackendSelection validates the user-supplied --backend flag and records it for the next keychain.Open* call. Cobra-layer only — it does NOT load config; openWith binds the flag pair against cfg.Keyring.Backend at the single credstore.Open call site.
Exported so a subcommand that defines its own PersistentPreRunE can call it explicitly: cobra does NOT chain PersistentPreRunE, so a shadowing subcommand silently loses the wiring without this hook. gro has no shadowers today; the regression test guards the pattern.
Reads via cmd.Flag() so persistent-flag inheritance works from any subcommand path.
Types ¶
This section is empty.