Close closes all backends that implement io.Closer.
()
| 78 | |
| 79 | // Close closes all backends that implement io.Closer. |
| 80 | func (c *ConnectionLogger) Close() error { |
| 81 | var errs error |
| 82 | for _, backend := range c.backends { |
| 83 | if closer, ok := backend.(io.Closer); ok { |
| 84 | if err := closer.Close(); err != nil { |
| 85 | errs = multierror.Append(errs, err) |
| 86 | } |
| 87 | } |
| 88 | } |
| 89 | return errs |
| 90 | } |
| 91 | |
| 92 | // DBBatcherOption is a functional option for configuring a DBBatcher. |
| 93 | type DBBatcherOption func(b *DBBatcher) |
nothing calls this directly
no test coverage detected