Commit graph

4 commits

Author SHA1 Message Date
Andrew Gerrand
3a41b3f1ce 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
Brian Goff
b16ccd9856 remove dead code after decoupling from jsonlog
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-07-21 20:47:35 -04:00
unclejack
d71cd58cbb pkg/broadcastwriter: add test w/ "" stream only
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
2015-04-01 01:02:18 +03:00
Erik Hollensbe
e722184c25 utils/broadcastwriter -> pkg/broadcastwriter
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
2014-08-06 16:37:01 -07:00