diff --git a/storage/fanout.go b/storage/fanout.go index 2bc4323a7..fe5c17f63 100644 --- a/storage/fanout.go +++ b/storage/fanout.go @@ -34,6 +34,10 @@ type fanout struct { // NewFanout returns a new fan-out Storage, which proxies reads and writes // through to multiple underlying storages. func NewFanout(logger log.Logger, primary Storage, secondaries ...Storage) Storage { + if len(secondaries) == 0 { + return primary + } + return &fanout{ logger: logger, primary: primary,