Skip to content

chore(doc): add guidance on error wrapping#5020

Merged
noahdietz merged 2 commits intogoogleapis:mainfrom
noahdietz:doc-wrap-errors
Apr 2, 2026
Merged

chore(doc): add guidance on error wrapping#5020
noahdietz merged 2 commits intogoogleapis:mainfrom
noahdietz:doc-wrap-errors

Conversation

@noahdietz
Copy link
Copy Markdown
Contributor

Fixes #5017

@noahdietz noahdietz requested a review from a team as a code owner April 2, 2026 18:08
@noahdietz noahdietz enabled auto-merge (squash) April 2, 2026 18:09
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the documentation in doc/howwewritego.md by adding a new section on error wrapping best practices. It details the appropriate usage of the %w format specifier for both context-adding error chains and sentinel errors, aligning with the Go Style Guide. I have no feedback to provide.

@noahdietz noahdietz merged commit 821586f into googleapis:main Apr 2, 2026
17 checks passed
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.

doc: add guidance on wrapping errors to howwewritego

2 participants