NewMultiWriteSyncer creates a WriteSyncer that duplicates its writes and sync calls, much like io.MultiWriter.
(ws ...WriteSyncer)
| 88 | // NewMultiWriteSyncer creates a WriteSyncer that duplicates its writes |
| 89 | // and sync calls, much like io.MultiWriter. |
| 90 | func NewMultiWriteSyncer(ws ...WriteSyncer) WriteSyncer { |
| 91 | if len(ws) == 1 { |
| 92 | return ws[0] |
| 93 | } |
| 94 | return multiWriteSyncer(ws) |
| 95 | } |
| 96 | |
| 97 | // See https://golang.org/src/io/multi.go |
| 98 | // When not all underlying syncers write the same number of bytes, |