Skip to content

v0.1.0

Latest

Choose a tag to compare

@DanielLin9406 DanielLin9406 released this 02 Mar 02:56
· 3 commits to main since this release

Added

  • Initial release of stackerr library.
  • Recover function to handle panics and wrap errors with stack traces.
  • ThrowPanic function to explicitly panic with a wrapped error containing the current stack trace.
  • GetStack helper to retrieve stack traces safely.
  • Internal callStackErr type implementing error and Unwrap interface.
  • Configuration support via stackerr.Config:
    • StripSequences: Custom strings to strip from function names (e.g., (0, ({).
    • PathReplacements: Custom file path cleanup (e.g., replacing $GOPATH with [Proj]).
    • MaxStackDepth: Configurable stack trace depth limit (default: 10).
    • Output: Configurable io.Writer for panic logs (default: os.Stderr).
  • Unit tests (stackerr_test.go) and usage examples (example_test.go).
  • GitHub Actions CI workflow for automated testing.
  • MIT License.