Skip to content

Commit 780f60f

Browse files
authored
Merge pull request #197 from elezar/add-error-to-configure
Allow top-level Configure to return an error
2 parents 86fe72e + 90955a9 commit 780f60f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/cdi/default-cache.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@ func GetDefaultCache() *Cache {
4444

4545
// Configure applies options to the default CDI cache. Updates and refreshes
4646
// the default cache if options are not empty.
47-
func Configure(options ...Option) {
47+
func Configure(options ...Option) error {
4848
cache, created := getOrCreateDefaultCache(options...)
4949
if len(options) == 0 || created {
50-
return
50+
return nil
5151
}
52-
cache.Configure(options...)
52+
return cache.Configure(options...)
5353
}
5454

5555
// Refresh explicitly refreshes the default CDI cache instance.

0 commit comments

Comments
 (0)