From c45726dbd6369405b033f2b17ddf07a1004d9bc4 Mon Sep 17 00:00:00 2001 From: jwijenbergh Date: Wed, 20 Nov 2024 10:12:01 +0100 Subject: FSM: Fix new keyword linting error --- internal/fsm/fsm_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'internal') diff --git a/internal/fsm/fsm_test.go b/internal/fsm/fsm_test.go index ebbf4c7..abe73e7 100644 --- a/internal/fsm/fsm_test.go +++ b/internal/fsm/fsm_test.go @@ -149,9 +149,9 @@ func TestGoTransitionRequired(t *testing.T) { for _, c := range cases { curr := machine.Current - machine.StateCallback = func(_ StateID, new StateID, data interface{}) bool { - if c.WantErr == "" && new != c.In { - t.Fatalf("new state is not what we want, got: %v, want: %v", new, c.In) + machine.StateCallback = func(_ StateID, newState StateID, data interface{}) bool { + if c.WantErr == "" && newState != c.In { + t.Fatalf("new state is not what we want, got: %v, want: %v", newState, c.In) } v, ok := data.(string) if !ok { @@ -217,9 +217,9 @@ func TestGoTransition(t *testing.T) { machine.StateCallback = func(StateID, StateID, interface{}) bool { return c.Handle } - machine.StateCallback = func(_ StateID, new StateID, data interface{}) bool { - if c.WantErr == "" && new != c.In { - t.Fatalf("new state is not what we want, got: %v, want: %v", new, c.In) + machine.StateCallback = func(_ StateID, newState StateID, data interface{}) bool { + if c.WantErr == "" && newState != c.In { + t.Fatalf("new state is not what we want, got: %v, want: %v", newState, c.In) } v, ok := data.(string) if !ok { -- cgit v1.2.3