Closed okhowang closed 3 years ago
reproducible example
package main import ( "context" "fmt" "github.com/qmuntal/stateless" ) func main() { sm := stateless.NewStateMachine("a") sm.Configure("a").OnExit(func(ctx context.Context, i ...interface{}) error { fmt.Printf("exit A:%+v\n", i) return nil }).Permit("toB", "b") sm.Configure("b").OnEntry(func(ctx context.Context, i ...interface{}) error { fmt.Printf("enter B:%+v\n", i) return nil }) sm.Fire("toB", 1) }
expected output
exit A:[1] enter B:[1]
actual output
exit A:[] enter B:[1]
reproducible example
expected output
actual output