Skip to content

Comments

remove errors.Is in tests#318

Merged
rminnich merged 1 commit intou-root:mainfrom
rminnich:vmerr
Oct 22, 2025
Merged

remove errors.Is in tests#318
rminnich merged 1 commit intou-root:mainfrom
rminnich:vmerr

Conversation

@rminnich
Copy link
Member

errors.Is(err, nil) is needed, in some places, but not here.

Sometimes packages return error wrapping nil, but not in this case.

But, see:
https://go.dev/play/p/yjBlsllddSE

Gemini confidently predicts that the code in the Playground is wrong. Oops. Thanks to brho for that test.

errors.Is(err, nil) is needed, in some places, but not here.

Sometimes packages return error wrapping nil, but not
in this case.

But, see:
https://go.dev/play/p/yjBlsllddSE

Gemini confidently predicts that the code in the Playground is
wrong. Oops. Thanks to brho for that test.

Signed-off-by: Ronald G Minnich <rminnich@gmail.com>
Copy link
Collaborator

@brho brho left a comment

Choose a reason for hiding this comment

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

errors that wrap nil are the devil

@rminnich rminnich merged commit 05ede15 into u-root:main Oct 22, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants