Skip to content

Commit

Permalink
Merge branch 'main' into new-provider-integration-test
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaspoignant authored Aug 14, 2024
2 parents ccad5a8 + 9802b6e commit f99b471
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ type Config struct {

// GetRetrievers returns a retriever.Retriever configure with the retriever available in the config.
func (c *Config) GetRetrievers() ([]retriever.Retriever, error) {
if c.Retriever == nil && (c.Retrievers == nil || len(c.Retrievers) == 0) {
if c.Retriever == nil && len(c.Retrievers) == 0 {
return nil, errors.New("no retriever in the configuration, impossible to get the flags")
}

Expand All @@ -113,7 +113,7 @@ func (c *Config) GetRetrievers() ([]retriever.Retriever, error) {
if c.Retriever != nil {
retrievers = append(retrievers, c.Retriever)
}
if c.Retrievers != nil && len(c.Retrievers) > 0 {
if len(c.Retrievers) > 0 {
retrievers = append(retrievers, c.Retrievers...)
}
return retrievers, nil
Expand Down

0 comments on commit f99b471

Please sign in to comment.