|
|
|
|
|
by samber
377 days ago
|
|
I wrote my own error wrapper: github.com/samber/oops Example: err := oops.
Code("iam_missing_permission").
In("authz").
Tags("authz").
Time(time.Now()).
With("user_id", 1234).
With("permission", "post.create").
Hint("Runbook: https://doc.acme.org/doc/abcd.md").
User("user-123", "firstname", "john", "lastname", "doe").
Errorf("permission denied") For easier debugging, the error contains the full stacktrace. |
|