@@ -71,26 +71,25 @@ func main() {
7171 continue
7272 }
7373
74+ status := m ["status" ].(string )
7475 // We test if the state is transient
75- if _ , ok := transientStates [m [ " status" ].( string ) ]; ok {
76+ if _ , ok := transientStates [status ]; ok {
7677 if transitioning {
77- log .Printf ("Interaction %d is in a transient state while we are already in transitient state. No need to record it: %s\n " , i , m [ " status" ] )
78+ log .Printf ("Interaction %d is in a transient state while we are already in transitient state. No need to record it: %s\n " , i , status )
7879
7980 continue
8081 } else {
82+ log .Printf ("Interaction %d is in a transient state: %s, Recording it\n " , i , status )
8183 transitioning = true
82-
83- log .Printf ("Interaction %d is in a transient state: %s, Recording it\n " , i , m ["status" ])
8484 outputCassette .AddInteraction (interaction )
8585 }
8686 } else {
8787 if transitioning {
88- log .Printf ("Interaction %d is not in a transient state anymore: %s, Recording it\n " , i , m [ " status" ] )
88+ log .Printf ("Interaction %d is not in a transient state anymore: %s, Recording it\n " , i , status )
8989 outputCassette .AddInteraction (interaction )
90-
9190 transitioning = false
9291 } else {
93- log .Printf ("Interaction %d is not in a transient state: %s, Recording it\n " , i , m [ " status" ] )
92+ log .Printf ("Interaction %d is not in a transient state: %s, Recording it\n " , i , status )
9493 outputCassette .AddInteraction (interaction )
9594 }
9695 }
0 commit comments