-
Notifications
You must be signed in to change notification settings - Fork 713
Wrap argument name cause could be err #32
Copy link
Copy link
Closed
Description
This might seem a little strange, but I think cause as an argument name to Wrap and Wrapf is unnecessary. I wonder if err might be good enough?
Here are some reasons:
- it's obvious that we're wrapping an error that caused the need to add context in the first place
- there's only one argument of type
error - it is possible the argument is not the 'root' cause, so in a sense, isn't the 'cause'
- IDE plugins will autofil and most of the time, the variable name would be
errso you could just tab past it
Very minor issue, and mainly I'm trying to save myself two key-presses each time I use this (which I will every day).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels