code: func HomeDir() (string, error) {
  	if runtime.GOOS == "windows" {
  		drive := os.Getenv("HOMEDRIVE")
  		home := os.Getenv("HOMEDIR")
  
  		if home == "" || drive == "" {
  			return "", fmt.Errorf("Cannot determine home dir, ensure HOMEDRIVE and HOMEDIR is set")
  		}
  
  		return filepath.Join(os.Getenv("HOMEDRIVE"), os.Getenv("HOMEDIR")), nil
  	}
  
  	home := os.Getenv("HOME")
  
  	if home == "" {
  		return "", fmt.Errorf("Cannot determine home dir, ensure HOME is set")
  	}
  
  	return home, nil
  
  }
docs: // HomeDir determines the home location without using the user package or requiring cgo
  //
  // On Unix it needs HOME set and on windows HOMEDRIVE and HOMEDIR