add logging
Some checks failed
Machine Tests / test (push) Waiting to run
Lint / golangci-lint (push) Has been cancelled

This commit is contained in:
Matthew Rich 2024-05-20 09:56:49 -07:00
parent 36f18d6e31
commit 7690d725fb

View File

@ -5,6 +5,7 @@ package machine
import (
_ "errors"
"fmt"
"log/slog"
)
type Transitioner interface {
@ -24,6 +25,7 @@ func NewTransition(trigger string, source State, dest State) Transitioner {
}
func (r *Transition) Run(m Modeler) error {
slog.Info("Transition.Run()", "transition", r, "model" m)
currentState := m.InspectState()
if currentState == r.dest {
return nil