MDobak / go-xerrors

The go-xerrors is an idiomatic and lightweight package that provides a set of functions to make working with errors easier.
MIT License
45 stars 1 forks source link

Add a value error type #2

Closed emilien-puget closed 11 months ago

emilien-puget commented 1 year ago

Greetings,

A way to add arbitrary values to an error chain would be nice to add context to an error chain, here is my proposal

MDobak commented 1 year ago

Hey! I haven't noticed your PR, sorry! I'll take a look at it during the weekend.

In fact, I had a similar feature in mind, but I decided not to include it after prototyping. However, maybe now is a good time to revisit the idea.