func (p *Progress) WithMaxSteps(maxSteps ...int) *Progress {
	if len(maxSteps) > 0 {
		p.MaxSteps = uint(maxSteps[0])
	}
	return p
}
WithMaxSteps setting max steps
package progress
import (
	"fmt"
	"regexp"
	"strings"
	"time"
	"github.com/gookit/color"
)
var widgetMatch = regexp.MustCompile(`{@([\w]+)(?::([\w-]+))?}`)
type WidgetFunc func(p *Progress) string
type Progresser interface {
	Start(maxSteps ...int)
	Advance(steps ...uint)
	AdvanceTo(step uint)
	Finish(msg ...string)
	Bound() interface{}
}
type Progress struct {
	Format string
	Newline bool
	MaxSteps uint
	StepWidth uint8
	Overwrite bool
	RedrawFreq uint8
	Widgets map[string]WidgetFunc
	Messages map[string]string
	step uint
	bound interface{}
	started bool
	percent float32
	firstRun bool
	startedAt  time.Time
	finishedAt time.Time
}
func New(maxSteps ...int) *Progress {
	var max uint
	if len(maxSteps) > 0 {
		max = uint(maxSteps[0])
	}
	return &Progress{
		Format:    DefFormat,
		MaxSteps:  max,
		StepWidth: 3,
		Overwrite: true,
		Widgets: make(map[string]WidgetFunc),
		Messages: map[string]string{"message": ""},
	}
}
func NewWithConfig(fn func(p *Progress), maxSteps ...int) *Progress {
	return New(maxSteps...).Config(fn)
}
func RenderFormat(f string) func(p *Progress) {
	return func(p *Progress) {
		p.Format = f
	}
}
func MaxSteps(maxStep int) func(p *Progress) {
	return func(p *Progress) {
		p.MaxSteps = uint(maxStep)
	}
}
func (p *Progress) Config(fn func(p *Progress)) *Progress {
	fn(p)
	return p
}
func (p *Progress) WithOptions(fns ...func(p *Progress)) *Progress {
	if len(fns) > 0 {
		for _, fn := range fns {
			fn(p)
		}
	}
	return p
}