Skip to content

Conversation

@kolyshkin
Copy link
Collaborator

Please see individual commits for details.

Instead of adding a string representation of errno to an error message,
wrap the actual errno using %w.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
The error from os.Readfile already contains file name and operation that
failed, there is no need to wrap it.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Error messages returned by GetHandle and GetSymbolPointer are already
descriptive enough so they don't need to be wrapped.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Using errors.New to make an error and then using %v to call its Error
method to add a string to the message seems unnecessary.

Simplify it by using the string as is.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
It makes little sense to have very detailed error messages saying which
response field we failed to typecast. Let's use more generic "failed to
parse response" error message, and show what we tried to parse.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
...if there are no %-style arguments.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Copy link
Collaborator

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

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

LGTM

@Luap99 Luap99 merged commit 68cc651 into coreos:main Sep 18, 2025
21 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.

2 participants