MCPcopy Index your code
hub / github.com/github/git-sizer / progressMeter

Struct progressMeter

meter/meter.go:34–47  ·  view source on GitHub ↗

progressMeter is a `Progress` that reports the current state every `period` to an `io.Writer`.

Source from the content-addressed store, hash-verified

32// progressMeter is a `Progress` that reports the current state every
33// `period` to an `io.Writer`.
34type progressMeter struct {
35 lock sync.Mutex
36 w io.Writer
37 format string
38 period time.Duration
39 lastShownCount int64
40 spinnerIndex int
41 // When `ticker` is changed, that tells the old goroutine that
42 // it's time to shut down.
43 ticker *time.Ticker
44
45 // `count` is updated atomically:
46 count int64
47}
48
49// NewProgressMeter returns a progress meter that can be used to show
50// progress to a TTY periodically, including an increasing int64

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected