If GetTransition is passed a context without transition value, ctx.Value() returns nil, and the type assertion fail, resulting in a panic. It does not match the documentation of the function.
panic: interface conversion: interface {} is nil, not stateless.Transition [recovered]
panic: interface conversion: interface {} is nil, not stateless.Transition
goroutine 594 [running]:
testing.tRunner.func1.2({0xa59e00, 0xc000d9a9c0})
/usr/local/go/src/testing/testing.go:1209 +0x24e
testing.tRunner.func1()
/usr/local/go/src/testing/testing.go:1212 +0x218
panic({0xa59e00, 0xc000d9a9c0})
/usr/local/go/src/runtime/panic.go:1038 +0x215
github.com/qmuntal/stateless.GetTransition(...)
/root/go/pkg/mod/github.com/qmuntal/stateless@v1.4.0/config.go:17
https://github.com/qmuntal/stateless/blob/d97731633b8155699d8c14872789ba1702ac1376/config.go#L14-L18
If GetTransition is passed a context without transition value, ctx.Value() returns nil, and the type assertion fail, resulting in a panic. It does not match the documentation of the function.