Codebase list golang-github-vbauerster-mpb / 6393138
initialize debugOut to io.Discard Vladimir Bauer 3 years ago
2 changed file(s) with 4 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
8383
8484 // WithDebugOutput sets debug output.
8585 func WithDebugOutput(w io.Writer) ContainerOption {
86 if w == nil {
87 w = io.Discard
88 }
8689 return func(s *pState) {
8790 s.debugOut = w
8891 }
8080 queueBars: make(map[*Bar]*Bar),
8181 output: os.Stdout,
8282 popPriority: math.MinInt32,
83 debugOut: io.Discard,
8384 }
8485
8586 for _, opt := range options {