code: func expandLocations() error {
  	newLocations := make(map[LocationEnum]string)
  	for key, dir := range locationTemplates {
  		for varName, value := range baseDirs {
  			dir = strings.Replace(dir, "${"+string(varName)+"}", value, -1)
  		}
  		var err error
  		dir, err = fs.ExpandTilde(dir)
  		if err != nil {
  			return err
  		}
  		newLocations[key] = filepath.Clean(dir)
  	}
  	locations = newLocations
  	return nil
  }
docs: // expandLocations replaces the variables in the locations map with actual
  // directory locations.