Hacker News new | ask | show | jobs
by darthbanane 378 days ago
The `WithMeta` func will panic if not passed a multiple of 2 varargs. This is exactly what makes go error handling difficult in the first place. Imagine panicking in production because you passed a key without value to your error wrapper for some reason.
1 comments

My solution handled that by inserting default value for the unbalanced key, and a new error key describing the log error