比較・検討
1. pkg errors or xerrorsをそのまま使う。→メンテされてないのが🥺
a. https://pkg.go.dev/github.com/pkg/errors
b. https://pkg.go.dev/golang.org/x/xerrors
2. その他の色々OSSを使う→要件に対してtoo muchなのと大体全てのエラーをラップするのが必要
a. https://github.com/juju/errors
b. https://github.com/go-errors/errors
c. https://github.com/morikuni/failure
d. https://github.com/hashicorp/go-multierror
e. https://github.com/rotisserie/eris
f. https://github.com/cockroachdb/errors
3. 自前
a. pkg errors or xerrorsあたりの実装を引っ張ってくる
b. debug.Stack(https://pkg.go.dev/runtime/debug#Stack)や、
runtime.Callers(https://pkg.go.dev/runtime#Callers)のメソッドを使う