Skip to content

Commit

Permalink
zapcore: Cleanup copy in NewMultiWriteSyncer (#934)
Browse files Browse the repository at this point in the history
The copy was originally in place due to golang/go#7809

Since that issue was fixed in Go 1.3 a few years ago, it seems safe to
drop the copy.
  • Loading branch information
prashantv authored and abhinav committed May 25, 2021
1 parent 92549f9 commit 15dca18
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions zapcore/write_syncer.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,7 @@ func NewMultiWriteSyncer(ws ...WriteSyncer) WriteSyncer {
if len(ws) == 1 {
return ws[0]
}
// Copy to protect against https://github.com/golang/go/issues/7809
return multiWriteSyncer(append([]WriteSyncer(nil), ws...))
return multiWriteSyncer(ws)
}

// See https://golang.org/src/io/multi.go
Expand Down

0 comments on commit 15dca18

Please sign in to comment.