State Chart is a tool that generates application code based on state charts to help solving complex tasks. Using state charts in programming has many advantages. Some of the most important are:
- Easier to understand & serves as a communication basis
- Decouple overall behavior from components
- Scales good with increasing complexity
- Supports documenting without additional effort
To get more information about state charts (in programming) or read about the concept of SC, consider visiting statechart.dev, which contains a nice collection of information and explanations regarding this topic.
The build-in version check and update capabilities
require a build flag to be set.
Consider removing an existing version before by running
rm ~/go/bin/sc
.
To do this there are currently two options:
- Automatic
- Install from Github
go install github.com/SoenkeD/sc@main
- Update it to set the build flag
sc version --update
- Manual
- Find the most recent (long) commit hash of the main branch (e.g. 78bd6bc89736f4ac35ca7aaf1fe0f9cba4e31159)
- Replace
COMMIT_HASH
with the recent has and executeGOFLAGS=-ldflags=-X=main.commitHash=COMMIT_HASH go install github.com/SoenkeD/sc@main
-
Install the
sc
tool from GitHub (see above) -
(optional) Read the documentation
-
Decide on a language on following the the available guides and examples