func (s *StepsRun) Err() error {
	return s.err
}
Err get error
package interact
import (
	"context"
	"fmt"
)
type StepHandler func(ctx context.Context) error
type StepsRun struct {
	stopped bool
	length int
	current int
	Steps []StepHandler
	err error
}
func (s *StepsRun) Run() {
	if s.stopped {
		return
	}
	s.length = len(s.Steps)
	if s.length == 0 {
		s.err = fmt.Errorf("no step need to running")
		return
	}
	ctx := context.Background()
	for i, handler := range s.Steps {
		s.current = i
		err := handler(ctx)
		if err != nil {
			s.err = err
			return
		}
	}
}
func (s *StepsRun) Stop() {
	s.stopped = true
}