code: func (a *Archivist) loadSettings(c context.Context, project types.ProjectName) (*Settings, error) {
  	if a.SettingsLoader == nil {
  		panic("no settings loader configured")
  	}
  
  	st, err := a.SettingsLoader(c, project)
  	switch {
  	case err != nil:
  		return nil, err
  
  	case st.GSBase.Bucket() == "":
  		log.Fields{
  			log.ErrorKey: err,
  			"gsBase":     st.GSBase,
  		}.Errorf(c, "Invalid storage base.")
  		return nil, errors.New("invalid storage base")
  
  	case st.GSStagingBase.Bucket() == "":
  		log.Fields{
  			log.ErrorKey:    err,
  			"gsStagingBase": st.GSStagingBase,
  		}.Errorf(c, "Invalid storage staging base.")
  		return nil, errors.New("invalid storage staging base")
  
  	default:
  		return st, nil
  	}
  }
docs: // loadSettings loads and validates archival settings.