qmuntal / stateless

Go library for creating finite state machines
BSD 2-Clause "Simplified" License
898 stars 47 forks source link

README does not explain where and how states are defined #47

Closed tvogt closed 1 year ago

tvogt commented 1 year ago

Neither the example nor other text ever says where variables like offTheHook come from and what type they need to be. The example should be complete, including definitions.

qmuntal commented 1 year ago

The README can't contain all the definitions, else it would become unreadable. Please take a look at the runnable examples in https://github.com/qmuntal/stateless/blob/master/example_test.go, there you have everything you need (I hope).