Skip to content

Add WrapNil and WrapfNil nil-safe error wrapping functions - #64

Closed
AdamMagued wants to merge 1 commit into
hashicorp:masterfrom
AdamMagued:wrap-nil-helpers
Closed

AdamMagued wants to merge 1 commit into
hashicorp:masterfrom
AdamMagued:wrap-nil-helpers

Conversation

@AdamMagued

Copy link
Copy Markdown

Add WrapNil and WrapfNil helper functions that return nil if the inner error is nil, avoiding manual nil guards before wrapping.

Fixes #5

Contributor Checklist

  • LLM Usage If an LLM was used to generate any code, please ensure and confirm you have read and followed the AI usage guide.

PCI review checklist

  • I have documented a clear reason for, and description of, the change I am making.

  • If applicable, I've documented a plan to revert these changes if they require more than reverting the pull request.

  • If applicable, I've documented the impact of any changes to security controls.

@AdamMagued
AdamMagued requested review from a team as code owners October 2, 2026 21:44
@AdamMagued
AdamMagued requested a review from Romeo-Em October 2, 2026 21:44
@hashicorp-cla-app

Copy link
Copy Markdown

CLA assistant check

Thank you for your submission! We require that all contributors sign our Contributor License Agreement ("CLA") before we can accept the contribution. Read and sign the agreement

Learn more about why HashiCorp requires a CLA and what the CLA includes


Adam Magued seems not to be a GitHub user.
You need a GitHub account to be able to sign the CLA.
If you have already a GitHub account, please add the email address used for this commit to your account.

Have you signed the CLA already but the status is still pending? Recheck it.

@AdamMagued

Copy link
Copy Markdown
Author

Closing this pull request. Sincere apologies for reopening this request without noticing the prior maintainer determination.

@AdamMagued AdamMagued closed this Oct 2, 2026
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.

Wrap, Wrapf equivalents that return nil on nil input

1 participant