code: func (configFile *ConfigFile) LegacyLoadFromReader(configData io.Reader) error {
  	b, err := ioutil.ReadAll(configData)
  	if err != nil {
  		return err
  	}
  
  	if err := json.Unmarshal(b, &configFile.AuthConfigs); err != nil {
  		arr := strings.Split(string(b), "\n")
  		if len(arr) < 2 {
  			return errors.Errorf("The Auth config file is empty")
  		}
  		authConfig := types.AuthConfig{}
  		origAuth := strings.Split(arr[0], " = ")
  		if len(origAuth) != 2 {
  			return errors.Errorf("Invalid Auth config file")
  		}
  		authConfig.Username, authConfig.Password, err = decodeAuth(origAuth[1])
  		if err != nil {
  			return err
  		}
  		authConfig.ServerAddress = defaultIndexServer
  		configFile.AuthConfigs[defaultIndexServer] = authConfig
  	} else {
  		for k, authConfig := range configFile.AuthConfigs {
  			authConfig.Username, authConfig.Password, err = decodeAuth(authConfig.Auth)
  			if err != nil {
  				return err
  			}
  			authConfig.Auth = ""
  			authConfig.ServerAddress = k
  			configFile.AuthConfigs[k] = authConfig
  		}
  	}
  	return nil
  }
docs: // LegacyLoadFromReader reads the non-nested configuration data given and sets up the
  // auth config information with given directory and populates the receiver object