func (p *Progress) SetMessageWidth(width int) {
	p.messageWidth = width
}
SetMessageWidth sets the (printed) length of the tracker message. Any message
longer the specified width will be snipped abruptly. Any message shorter than
the specified width will be padded with spaces.
package progress
import (
	"io"
	"os"
	"sync"
	"time"
	"unicode/utf8"
)
var (
	DefaultLengthTracker = 20
	DefaultUpdateFrequency = time.Millisecond * 250
)
type Progress struct {
	autoStop              bool
	done                  chan bool
	lengthTracker         int
	lengthProgress        int
	outputWriter          io.Writer
	hideTime              bool
	hideTracker           bool
	hideValue             bool
	hidePercentage        bool
	messageWidth          int
	numTrackersExpected   int64
	overallTracker        *Tracker
	overallTrackerMutex   sync.RWMutex
	renderInProgress      bool
	renderInProgressMutex sync.RWMutex
	showETA               bool
	showOverallTracker    bool
	sortBy                SortBy
	style                 *Style
	trackerPosition       Position
	trackersActive        []*Tracker
	trackersActiveMutex   sync.RWMutex
	trackersDone          []*Tracker
	trackersDoneMutex     sync.RWMutex
	trackersInQueue       []*Tracker
	trackersInQueueMutex  sync.RWMutex
	updateFrequency       time.Duration
}
type Position int
const (
	PositionLeft Position = iota
	PositionRight
)
func (p *Progress) AppendTracker(t *Tracker) {
	t.start()
	p.overallTrackerMutex.Lock()
	if p.overallTracker == nil {
		p.overallTracker = &Tracker{Total: 1}
		if p.numTrackersExpected > 0 {
			p.overallTracker.Total = p.numTrackersExpected * 100
		}
		p.overallTracker.start()
	}
	p.trackersInQueueMutex.Lock()
	p.trackersInQueue = append(p.trackersInQueue, t)
	p.trackersInQueueMutex.Unlock()
	p.overallTracker.mutex.Lock()
	if p.overallTracker.Total < int64(p.Length())*100 {
		p.overallTracker.Total = int64(p.Length()) * 100
	}
	p.overallTracker.mutex.Unlock()
	p.overallTrackerMutex.Unlock()
}
func (p *Progress) AppendTrackers(trackers []*Tracker) {
	for _, tracker := range trackers {
		p.AppendTracker(tracker)
	}
}
func (p *Progress) IsRenderInProgress() bool {
	p.renderInProgressMutex.RLock()
	defer p.renderInProgressMutex.RUnlock()
	return p.renderInProgress
}
func (p *Progress) Length() int {
	p.trackersActiveMutex.RLock()
	p.trackersDoneMutex.RLock()
	p.trackersInQueueMutex.RLock()
	out := len(p.trackersInQueue) + len(p.trackersActive) + len(p.trackersDone)
	p.trackersInQueueMutex.RUnlock()
	p.trackersDoneMutex.RUnlock()
	p.trackersActiveMutex.RUnlock()
	return out
}
func (p *Progress) LengthActive() int {
	p.trackersActiveMutex.RLock()
	p.trackersInQueueMutex.RLock()
	out := len(p.trackersInQueue) + len(p.trackersActive)
	p.trackersInQueueMutex.RUnlock()
	p.trackersActiveMutex.RUnlock()
	return out
}
func (p *Progress) LengthDone() int {
	p.trackersDoneMutex.RLock()
	out := len(p.trackersDone)
	p.trackersDoneMutex.RUnlock()
	return out
}
func (p *Progress) LengthInQueue() int {
	p.trackersInQueueMutex.RLock()
	out := len(p.trackersInQueue)
	p.trackersInQueueMutex.RUnlock()
	return out
}
func (p *Progress) SetAutoStop(autoStop bool) {
	p.autoStop = autoStop
}