Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use fmt for errors, like slog.TextHandler #11

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ansel1
Copy link

@ansel1 ansel1 commented Jan 8, 2025

Uses fmt.Fprintf with "%+v" to print errors. Useful with some error packages which render additional information like stacktraces. Addresses #7

Russ Egan and others added 2 commits January 7, 2025 21:16
Uses fmt.Fprintf with "%+v" to print errors.  Useful with some error packages which render additional information like stacktraces.  Addresses phsym#7
If the error doesn't implement fmt.Formatter, as most won't, its faster to use err.Error() than always use fmt to print the error.
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.

1 participant