Skip to content

Add Go example tests for pkg.go.dev#12

Merged
ankurs merged 3 commits intomainfrom
feat/example-tests
Mar 24, 2026
Merged

Add Go example tests for pkg.go.dev#12
ankurs merged 3 commits intomainfrom
feat/example-tests

Conversation

@ankurs
Copy link
Copy Markdown
Member

@ankurs ankurs commented Mar 23, 2026

Summary

  • Add example_test.go with examples for New, Wrap, Newf, StackFrame, and errors.Is compatibility
  • Examples appear on pkg.go.dev as runnable documentation
  • Regenerate READMEs via gomarkdoc

Test plan

  • make test passes
  • Verify examples appear on pkg.go.dev after merge

Add example_test.go with examples for New, Wrap, Newf, StackFrame,
and errors.Is compatibility. These appear on pkg.go.dev as runnable
examples. Regenerate READMEs via gomarkdoc.
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds runnable Go examples so the github.com/go-coldbrew/errors package documentation on pkg.go.dev includes concrete usage for key APIs, and regenerates generated README docs accordingly.

Changes:

  • Add example_test.go with Go doc examples for New, Newf, Wrap, ErrorExt.StackFrame, and errors.Is compatibility.
  • Regenerate README.md to include rendered example blocks for the documented APIs.
  • Regenerate notifier/README.md (including updated index entries and header badges).

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
README.md Adds generated <details> example blocks, including an example for StackFrame.
notifier/README.md Regenerated notifier package docs and updated header badges / index entries.
example_test.go Introduces pkg.go.dev / go test runnable examples for core error APIs and stdlib compatibility.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md Outdated
Comment thread notifier/README.md Outdated
- Rename ExampleErrorExt_StackFrame to Example_stackFrame to fix
  gomarkdoc rendering "3tack Frame" typo in README
- Add notifier/.gomarkdoc.yml so GoDoc badge links to the correct
  subpackage (errors/notifier instead of errors)
- Update Makefile doc target to regenerate notifier README separately
- Add examples for Wrapf, WrapWithStatus (gRPC codes), and Cause
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 23, 2026

Warning

Rate limit exceeded

@ankurs has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 13 minutes and 5 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 6ef1ad33-1e09-4f3e-b9c8-cff787ac6c95

📥 Commits

Reviewing files that changed from the base of the PR and between 3f559bc and ddd5bd8.

📒 Files selected for processing (5)
  • Makefile
  • README.md
  • example_test.go
  • notifier/.gomarkdoc.yml
  • notifier/README.md
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/example-tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md Outdated
Comment thread example_test.go
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md Outdated
Comment thread Makefile Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ankurs ankurs merged commit e26a85e into main Mar 24, 2026
12 checks passed
@ankurs ankurs deleted the feat/example-tests branch March 24, 2026 01:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants