initialize debugOut to io.Discard
Vladimir Bauer
3 years ago
| 83 | 83 |
|
| 84 | 84 |
// WithDebugOutput sets debug output.
|
| 85 | 85 |
func WithDebugOutput(w io.Writer) ContainerOption {
|
|
86 |
if w == nil {
|
|
87 |
w = io.Discard
|
|
88 |
}
|
| 86 | 89 |
return func(s *pState) {
|
| 87 | 90 |
s.debugOut = w
|
| 88 | 91 |
}
|
| 80 | 80 |
queueBars: make(map[*Bar]*Bar),
|
| 81 | 81 |
output: os.Stdout,
|
| 82 | 82 |
popPriority: math.MinInt32,
|
|
83 |
debugOut: io.Discard,
|
| 83 | 84 |
}
|
| 84 | 85 |
|
| 85 | 86 |
for _, opt := range options {
|