1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/pkg/broadcastwriter
Andrew Gerrand 31cbf76d0c Use a slice instead of a map of io.WriteClosers in broadcastwriter
Maps rely on the keys being comparable.
Using an interface type as the map key is dangerous,
because some interface types are not comparable.
I talked about this in my "Stupid Gopher Tricks" talk:
	https://talks.golang.org/2015/tricks.slide

In this case, if the user-provided writer is backed by a slice
(such as io.MultiWriter) then the code will panic at run time.

Signed-off-by: Andrew Gerrand <adg@golang.org>
2015-08-21 14:08:04 +01:00
..
broadcastwriter.go Use a slice instead of a map of io.WriteClosers in broadcastwriter 2015-08-21 14:08:04 +01:00
broadcastwriter_test.go Use a slice instead of a map of io.WriteClosers in broadcastwriter 2015-08-21 14:08:04 +01:00