looplab/fsm

Finite State Machine for Go

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 53 minutes ago
Type:Library / SDKCategory(s):Core & Utility LibrariesLanguages & Runtimes
Added to GitGenius on September 20th, 2026
Created on August 21st, 2013
Open Issues & Pull Requests: 29 (+0)
GitHub issues: Enabled
Number of forks: 331
Total Stargazers: 3,415 (+0)
Total Subscribers: 49 (+0)

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 2
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 1,775 days
Stale 30+ days: 2
Stale 90+ days: 2

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • enhancement (2)

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

FSM is a finite state machine library for Go.

The library addresses the need to model and manage state transitions in applications by providing a declarative way to define states, events, and the transitions between them. It allows developers to attach callbacks to state changes and events, enabling side effects and validation logic to be executed at specific points in the state machine's lifecycle. The implementation draws design patterns from established finite state machine libraries in other languages, adapting them to Go's idioms and conventions.

Developers should consider this tool when building systems that require explicit state management, such as workflow engines, game logic, protocol handlers, or any application where tracking and controlling state transitions is central to correctness. The library suits projects of any scale where the complexity of managing state through conditionals and flags becomes unwieldy. It works both as a standalone state machine and as a field embedded within structs, making it flexible for different architectural patterns.

The project maintains a stable codebase with infrequent but deliberate updates. Pull requests receive careful review and discussion before integration. The maintainers respond to issues and engage with the community, though the pace of activity reflects a mature tool that has settled into a stable state rather than one undergoing rapid feature development.