Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RequireExperimental ¶
RequireExperimental checks whether the --experimental (-X) flag has been set on the command (or any of its parents, since it is a persistent flag). It returns a descriptive error when the flag is not set, guiding the user to opt in explicitly. Note: This function assumes that what is "experimental" is a subcommand, rather than a flag on an otherwise non-experimental command.
func RequireExperimentalFlag ¶ added in v1.17.0
RequireExperimentalFlag checks whether the --experimental (-X) flag has been set, for a single flag on an otherwise-stable command. Unlike RequireExperimental, it is a no-op — returning nil — when flagName was not passed at all, so the rest of the command remains fully stable and ungated. It only requires --experimental once the caller actually uses the experimental flag.
Types ¶
This section is empty.