MCPcopy
hub / github.com/uber-go/zap / NewMultiWriteSyncer

Function NewMultiWriteSyncer

zapcore/write_syncer.go:90–95  ·  view source on GitHub ↗

NewMultiWriteSyncer creates a WriteSyncer that duplicates its writes and sync calls, much like io.MultiWriter.

(ws ...WriteSyncer)

Source from the content-addressed store, hash-verified

88// NewMultiWriteSyncer creates a WriteSyncer that duplicates its writes
89// and sync calls, much like io.MultiWriter.
90func 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,

Calls 1

multiWriteSyncerTypeAlias · 0.85