(value float64)
| 13 | } |
| 14 | |
| 15 | func (p *Progress) NextStep(value float64) bool { |
| 16 | // test guard |
| 17 | if p != nil && value >= p.current { |
| 18 | for p.current <= value { |
| 19 | p.current += p.step |
| 20 | } |
| 21 | |
| 22 | return true |
| 23 | } |
| 24 | |
| 25 | return false |
| 26 | } |
| 27 | |
| 28 | func (p *Progress) Reset() { |
| 29 | // test guard |
no outgoing calls