Resolved TODO about indeterminate ProgressBar repetition by deciding to leave it to the implementation.

This commit is contained in:
Pietro Gagliardi 2014-06-04 19:09:26 -04:00
parent bd08967a5a
commit fb7e638d69
1 changed files with 1 additions and 1 deletions

View File

@ -28,7 +28,7 @@ func NewProgressBar() *ProgressBar {
// If percent is in the range [0,100], the progressBar shows that much percent complete.
// If percent is -1, the ProgressBar is made indeterminate.
// Otherwise, SetProgress panics.
// TODO what happens if you repeatedly call SetProgress(-1)?
// Calling SetProgress(-1) repeatedly will neither leave indeterminate mode nor stop any animation involved in indeterminate mode indefinitely; any other side-effect of doing so is implementation-defined.
func (p *ProgressBar) SetProgress(percent int) {
p.lock.Lock()
defer p.lock.Unlock()