Skip to content

Comments

feat: add Errors for separating joined errors.#21

Merged
k1LoW merged 2 commits intomainfrom
errors
Sep 12, 2025
Merged

feat: add Errors for separating joined errors.#21
k1LoW merged 2 commits intomainfrom
errors

Conversation

@k1LoW
Copy link
Owner

@k1LoW k1LoW commented Sep 12, 2025

This pull request introduces a new utility function to the k1LoW/errors package for splitting joined errors, updates the documentation to reflect this addition, and adds comprehensive tests to ensure correct behavior.

New functionality

  • Added a new Errors function to errors.go that recursively splits joined errors and returns all underlying errors as a flat slice.

Documentation updates

  • Updated the "Key features" list in README.md to mention the ability to split joined errors.
  • Updated the comparison section in README.md to include the new Errors function alongside existing features.

Testing

  • Added a new TestErrors unit test in errors_test.go to verify the correct splitting of joined and nested joined errors, as well as handling of non-joined errors.

@k1LoW k1LoW self-assigned this Sep 12, 2025
@k1LoW k1LoW added enhancement New feature or request minor labels Sep 12, 2025
@github-actions
Copy link
Contributor

Code Metrics Report

Coverage Code to Test Ratio Test Execution Time
96.5% 1:2.4 13s

Code coverage of files in pull request scope (96.5%)

Files Coverage
errors.go 96.5%

Reported by octocov

@k1LoW k1LoW merged commit 3889ed3 into main Sep 12, 2025
1 check passed
@k1LoW k1LoW deleted the errors branch September 12, 2025 04:21
@github-actions github-actions bot mentioned this pull request Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request minor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant