vsphere/internal/virtualdevice/virtual_machine_disk_subresource.go
func diskPathOrName(data map[string]interface{}) string {
	var path, name string
	if v, ok := data["path"]; ok && v != nil {
		path = v.(string)
	}
	if v, ok := data["name"]; ok && v != nil {
		name = v.(string)
	}
	if path != "" {
		log.Printf("[DEBUG] diskPathOrName: Using defined path value %q", path)
		return path
	}
	log.Printf("[DEBUG] diskPathOrName: Using defined name value as fallback %q", name)
	return name
}
func diskPathOrName(data map[string]interface{}) string {
	var path, name string
	if v, ok := data["path"]; ok && v != nil {
		path = v.(string)
	}
	if v, ok := data["name"]; ok && v != nil {
		name = v.(string)
	}
	if path != "" {
		log.Printf("[DEBUG] diskPathOrName: Using defined path value %q", path)
		return path
	}
	log.Printf("[DEBUG] diskPathOrName: Using defined name value as fallback %q", name)
	return name
}
// diskPathOrName is a helper method that returns the path for a disk - either
// its path attribute or name as a fallback.
//
// TODO: This method will be removed in future releases.