MCPcopy Create free account
hub / github.com/AndroidPoet/playconsole-cli / MustMarkPersistentFlagRequired

Function MustMarkPersistentFlagRequired

internal/cli/shared.go:123–127  ·  view source on GitHub ↗

MustMarkPersistentFlagRequired marks a persistent flag as required during command initialization.

(cmd *cobra.Command, name string)

Source from the content-addressed store, hash-verified

121
122// MustMarkPersistentFlagRequired marks a persistent flag as required during command initialization.
123func MustMarkPersistentFlagRequired(cmd *cobra.Command, name string) {
124 if err := cmd.MarkPersistentFlagRequired(name); err != nil {
125 panic(fmt.Sprintf("failed to mark persistent flag %q as required on %q: %v", name, cmd.Name(), err))
126 }
127}

Callers 1

initFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected