storage/fanout.go
func (f *fanout) Close() error {
	if err := f.primary.Close(); err != nil {
		return err
	}

	// TODO return multiple errors?
	var lastErr error
	for _, storage := range f.secondaries {
		if err := storage.Close(); err != nil {
			lastErr = err
		}
	}
	return lastErr
}
func (f *fanout) Close() error {
	if err := f.primary.Close(); err != nil {
		return err
	}

	// TODO return multiple errors?
	var lastErr error
	for _, storage := range f.secondaries {
		if err := storage.Close(); err != nil {
			lastErr = err
		}
	}
	return lastErr
}
func ( f * fanout ) Close ( ) error { if err := f . primary . Close ( ) ; err != nil { return err } // TODO return multiple errors? var lastErr error for _ , storage := range f . secondaries { if err := storage . Close ( ) ; err != nil { lastErr = err } } return lastErr }
// Close closes the storage and all its underlying resources.
Close closes the storage and all its underlying resources .