errorWorker outputs the errors as they come in. This needs to be a range and should not handle the context so the channel always has a receiver and libgobuster will not block.
(g *libgobuster.Gobuster, wg *sync.WaitGroup)
| 59 | // errorWorker outputs the errors as they come in. This needs to be a range and should not handle |
| 60 | // the context so the channel always has a receiver and libgobuster will not block. |
| 61 | func errorWorker(g *libgobuster.Gobuster, wg *sync.WaitGroup) { |
| 62 | defer wg.Done() |
| 63 | |
| 64 | for e := range g.Progress.ErrorChan { |
| 65 | if !g.Opts.Quiet && !g.Opts.NoError { |
| 66 | g.Logger.Error(e.Error()) |
| 67 | g.Logger.Debugf("%#v", e) |
| 68 | } |
| 69 | } |
| 70 | } |
| 71 | |
| 72 | // messageWorker outputs messages as they come in. This needs to be a range and should not handle |
| 73 | // the context so the channel always has a receiver and libgobuster will not block. |