From 806b8484f1cb674734ca61f1298615103333ff77 Mon Sep 17 00:00:00 2001 From: Sven Walter Date: Fri, 14 Jun 2024 15:55:39 +0200 Subject: [PATCH] add migration task for github.com/pkg/errors --- migrations.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 migrations.md diff --git a/migrations.md b/migrations.md new file mode 100644 index 0000000..07032c2 --- /dev/null +++ b/migrations.md @@ -0,0 +1,15 @@ +# Migrations + +This file contains a list of tasks that are either required or at least +strongly recommended to align projects using this SDK. + +## 2024-06-14 Remove all uses of `github.com/pkg/errors` + +### Reasoning + +[github.com/pkg/errors](https://github.com/pkg/errors)` is deprecated. Since the built-in `errors` package improved a bit in the recent Go versions, we should remove all uses of `github.com/pkg/errors` and replace it with the `errors` package. + +### Hints + +* Use the pattern `return fmt.Errorf("something happenend with %#v: %w", someID, err)` +* The stack trace feature gets lost. Therefore it is suggested to properly add error messages each time handling errors.