// TODO rewrite to v2package statesimport (am)// S is a type alias for a list of state names.typeS = am.S// States map defines relations and properties of states.// TODO rename to relvarStates = am.Schema{A: {Auto: true,Require: S{C}, },B: {Multi: true,Add: S{C}, },C: {After: S{D}, },D: {Add: S{C, B}, },}// Groups of mutually exclusive states.// var (// GroupPlaying = S{Playing, Paused}// )// #region boilerplate defs// Names of all the states (pkg enum).const (A = "A"B = "B"C = "C"D = "D")// Names is an ordered list of all the state names.varNames = S{am.StateException,A,B,C,D,}// #endregionfunc ( context.Context) *am.Machine {returnam.New(, States, nil)}
The pages are generated with Goldsv0.8.2. (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds.