func validateVirtualMachineFolder(folder *object.Folder) (*object.Folder, error) {
	ft, err := FindType(folder)
	if err != nil {
		return nil, err
	}
	if ft != VSphereFolderTypeVM {
		return nil, fmt.Errorf("%q is not a VM folder", folder.InventoryPath)
	}
	log.Printf("[DEBUG] Folder located: %q", folder.InventoryPath)
	return folder, nil
}
func validateVirtualMachineFolder(folder *object.Folder) (*object.Folder, error) {
	ft, err := FindType(folder)
	if err != nil {
		return nil, err
	}
	if ft != VSphereFolderTypeVM {
		return nil, fmt.Errorf("%q is not a VM folder", folder.InventoryPath)
	}
	log.Printf("[DEBUG] Folder located: %q", folder.InventoryPath)
	return folder, nil
}
func validateVirtualMachineFolder ( folder * object . Folder ) ( * object . Folder , error ) { ft , err := FindType ( folder ) if err != nil { return nil , err } if ft != VSphereFolderTypeVM { return nil , fmt . Errorf ( " " , folder . InventoryPath ) } log . Printf ( " " , folder . InventoryPath ) return folder , nil }
// validateVirtualMachineFolder checks to make sure the folder is a VM folder,
// and returns it if it is, or an error if it isn't.
validateVirtualMachineFolder checks to make sure the folder is a VM folder and returns it if it is or an error if it isn t .