vmx.go
func writeVmx(path string, vmx map[string]string) error {
	f, err := os.Create(path)
	if err != nil {
		return err
	}

	defer f.Close()

	keys := make([]string, len(vmx))
	i := 0
	for k := range vmx {
		keys[i] = k
		i++
	}

	sort.Strings(keys)

	var buf bytes.Buffer
	for _, key := range keys {
		buf.WriteString(key + " = " + `"` + vmx[key] + `"`)
		buf.WriteString("\n")
	}

	if _, err = io.Copy(f, &buf); err != nil {
		return err
	}

	return nil
}
func writeVmx(path string, vmx map[string]string) error {
	f, err := os.Create(path)
	if err != nil {
		return err
	}

	defer f.Close()

	keys := make([]string, len(vmx))
	i := 0
	for k := range vmx {
		keys[i] = k
		i++
	}

	sort.Strings(keys)

	var buf bytes.Buffer
	for _, key := range keys {
		buf.WriteString(key + " = " + `"` + vmx[key] + `"`)
		buf.WriteString("\n")
	}

	if _, err = io.Copy(f, &buf); err != nil {
		return err
	}

	return nil
}
// TODO(c4milo): Legacy function, this is to be removed once we migrate
// the dependant code