code: func NameFromCommandArgs(cmd *cobra.Command, args []string) (string, error) {
  	argsLen := cmd.ArgsLenAtDash()
  	// ArgsLenAtDash returns -1 when -- was not specified
  	if argsLen == -1 {
  		argsLen = len(args)
  	}
  	if argsLen != 1 {
  		return "", cmdutil.UsageErrorf(cmd, "exactly one NAME is required, got %d", argsLen)
  	}
  	return args[0], nil
  }
docs: // NameFromCommandArgs is a utility function for commands that assume the first argument is a resource name