Repository navigation
Breaking changes
- Minimum supported Go version is now Go 1.19. This enables modern typed atomics used by the race-safe runtime state.
pin.ForceInteractiveis no longer an exported mutable package variable. Usepin.SetForceInteractive(true)/pin.SetForceInteractive(false)to control forced interactive rendering, andpin.ForceInteractive()to read the current value.
Migration example:
// Before
pin.ForceInteractive = true
defer func() { pin.ForceInteractive = false }()
// After
pin.SetForceInteractive(true)
defer pin.SetForceInteractive(false)Reliability fixes
- Serialized spinner lifecycle state so concurrent
Start,Stop,Fail, and returned cancel functions cannot leak goroutines, leave stale stop signals, or stop newer runs. - Made non-terminal
StopandFailfully clean up their run without requiring callers to also call the returned cancel function. - Added serialized writer access and fixed
Failso it respectsWithWriterinstead of writing terminal control bytes to process stdout. - Made
Messagesafe to call concurrently withUpdateMessage. - Made custom spinner frames defensive: nil/empty frame slices keep defaults, and non-empty slices are copied.
- Made
WithWriter(nil)a no-op. - Fixed right-position rendering to use the configured spinner color.
Docs and tests
- Updated README and example prompt docs for Go 1.19, the new force-interactive API, and current
Start(context.Context)usage. - Added race and lifecycle regression tests covering concurrent starts/stops, old cancel functions, non-terminal cleanup, writer routing, and custom frame edge cases.