nuclei/v2/internal/progress/progress_noop.go
Manuel Bua 02238c491b Use manual progressbar rendering to allow syncing with other output
Refactor into an interface to return a no-op impl, avoid the need to
conditionally invoke any of the methods.
2020-07-31 23:36:56 +02:00

16 lines
979 B
Go

package progress
import "github.com/vbauerster/mpb/v5"
type NoOpProgress struct{}
func (p *NoOpProgress) setupProgressbar(name string, total int64, priority int) *mpb.Bar { return nil }
func (p *NoOpProgress) InitProgressbar(hostCount int64, templateCount int, requestCount int64) {}
func (p *NoOpProgress) AddToTotal(delta int64) {}
func (p *NoOpProgress) Update() {}
func (p *NoOpProgress) render() {}
func (p *NoOpProgress) Drop(count int64) {}
func (p *NoOpProgress) Wait() {}
func (p *NoOpProgress) StartStdCapture() {}
func (p *NoOpProgress) StopStdCapture() {}