func (pb *ProgressBar) GetPrintBefore() string {
	pb.lock.Lock()
	val := pb.printBefore
	pb.lock.Unlock()
	return val
}
GetPrintBefore gets the text printed on the line before the progress bar.
package progressutil
import (
	"fmt"
	"io"
	"os"
	"strings"
	"sync"
	"golang.org/x/crypto/ssh/terminal"
)
var (
	ErrorProgressOutOfBounds = fmt.Errorf("progress is out of bounds (0 to 1)")
	ErrorNoBarsAdded = fmt.Errorf("AddProgressBar hasn't been called yet")
)
type ProgressBar struct {
	lock sync.Mutex
	currentProgress float64
	printBefore     string
	printAfter      string
	done            bool
}
func (pb *ProgressBar) clone() *ProgressBar {
	pb.lock.Lock()
	pbClone := &ProgressBar{
		currentProgress: pb.currentProgress,
		printBefore:     pb.printBefore,
		printAfter:      pb.printAfter,
		done:            pb.done,
	}
	pb.lock.Unlock()
	return pbClone
}
func (pb *ProgressBar) GetCurrentProgress() float64 {
	pb.lock.Lock()
	val := pb.currentProgress
	pb.lock.Unlock()
	return val
}
func (pb *ProgressBar) SetCurrentProgress(progress float64) error {
	if progress < 0 || progress > 1 {
		return ErrorProgressOutOfBounds
	}
	pb.lock.Lock()
	pb.currentProgress = progress
	pb.lock.Unlock()
	return nil
}
func (pb *ProgressBar) GetDone() bool {
	pb.lock.Lock()
	val := pb.done
	pb.lock.Unlock()
	return val
}
func (pb *ProgressBar) SetDone(val bool) {
	pb.lock.Lock()
	pb.done = val
	pb.lock.Unlock()
}