code: func settingsPath() (string, error) {
  	settingsPath := os.Getenv("CRANE_SETTINGS_PATH")
  	if len(settingsPath) > 0 {
  		return settingsPath, nil
  	}
  	if runtime.GOOS == "windows" {
  		settingsPath = os.Getenv("APPDATA")
  		if len(settingsPath) > 0 {
  			return fmt.Sprintf("%s/crane", settingsPath), nil
  		}
  		return "", errors.New("Cannot detect settings path!")
  	}
  	settingsPath = os.Getenv("XDG_CONFIG_HOME")
  	if len(settingsPath) > 0 {
  		return fmt.Sprintf("%s/crane", settingsPath), nil
  	}
  	homeDir := os.Getenv("HOME")
  	if len(homeDir) > 0 {
  		return fmt.Sprintf("%s/.config/crane", homeDir), nil
  	}
  	return "", errors.New("Cannot detect settings path!")
  }
docs: // Determine crane settings base path.
  // On windows, this is %APPDATA%\\crane
  // On unix, this is ${XDG_CONFIG_HOME}/crane (which usually
  // is ${HOME}/.config)