Skip to content

Commit

Permalink
Merge pull request #197 from elezar/add-error-to-configure
Browse files Browse the repository at this point in the history
Allow top-level Configure to return an error
  • Loading branch information
klihub committed Mar 16, 2024
2 parents 86fe72e + 90955a9 commit 780f60f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/cdi/default-cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ func GetDefaultCache() *Cache {

// Configure applies options to the default CDI cache. Updates and refreshes
// the default cache if options are not empty.
func Configure(options ...Option) {
func Configure(options ...Option) error {
cache, created := getOrCreateDefaultCache(options...)
if len(options) == 0 || created {
return
return nil
}
cache.Configure(options...)
return cache.Configure(options...)
}

// Refresh explicitly refreshes the default CDI cache instance.
Expand Down

0 comments on commit 780f60f

Please sign in to comment.