package phases
import "k8s.io/kubernetes/cmd/kubeadm/app/cmd/util"
Index ¶
- func SubCmdRunE(name string) func(*cobra.Command, []string) error
- func ValidateExactArgNumber(args []string, supportedArgs []string) error
Functions ¶
func SubCmdRunE ¶
SubCmdRunE returns a function that handles a case where a subcommand must be specified Without this callback, if a user runs just the command without a subcommand, or with an invalid subcommand, cobra will print usage information, but still exit cleanly. We want to return an error code in these cases so that the user knows that their command was invalid.
func ValidateExactArgNumber ¶
ValidateExactArgNumber validates that the required top-level arguments are specified
Source Files ¶
cmdutil.go
- Version
- v1.8.6-beta.0
- Published
- Dec 7, 2017
- Platform
- js/wasm
- Imports
- 2 packages
- Last checked
- 18 minutes ago –
Tools for package owners.