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
Lei Jitang
fcb8d8d48e
Enable golint part of #14756
...
pkg/broadcastwriter
pkg/graphdb
pkg/httputils
pkg/ioutils
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2015-08-03 09:45:05 +08: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
d9fa79b73c
pkg/broadcastwriter: reset after 4 KB w/o stream
...
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
2015-04-01 01:26:19 +03:00
Alexander Morozov
61ad4654f5
Skip heavy operations if there is no jsonlog writers
...
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-04-01 01:02:18 +03:00
unclejack
dd54d0419c
pkg/broadcastwriter: use []byte to lower alloc
...
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
2015-04-01 01:02:18 +03: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
unclejack
d98dd3ecef
pkg/broadcastwriter: avoid alloc w/ WriteString
...
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
2015-03-29 15:20:53 +03:00
Antonio Murdaca
18180bfabf
Replace aliased imports of logrus, fixes #11762
...
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-03-26 23:22:04 +01:00
Alexandr Morozov
015f966a1b
Mass gofmt
...
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-10-24 15:11:48 -07:00
Alexandr Morozov
712a6554ce
Use logrus everywhere for logging
...
Fixed #8761
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-10-24 15:03:06 -07:00
unclejack
df3e370955
use custom marshalling for JSONLog
...
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-09-17 17:03:54 +03:00
Josiah Kiehl
6d4b3605f7
Extract log utils into pkg/log
...
Docker-DCO-1.1-Signed-off-by: Josiah Kiehl <josiah@capoferro.net> (github: capoferro)
2014-08-13 15:18:15 -07:00
Erik Hollensbe
cc2edda3b8
utils.Debugf -> log.Printf, move jsonlog to own package.
...
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
2014-08-06 16:39:01 -07: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