これは、なにをしたくて書いたもの? Goのエラー処理に関する情報を見ているとxerrorsというものがよく出てくるので、1度見ておこうかなと思いまして。 xerrorsパッケージ xerrorsパッケージは、Goのエラーハンドリングのためのパッケージです。 xerrors · pkg.go.dev GitHub - golang/xerrors このパッケージの提案内容は、こちら。 Proposal: Go 2 Error Inspection これが標準パッケージ、errorsに取り込まれたのがGo 1.13のようです。 errors - The Go Programming Language errorsパッケージについては、以前このエントリで試してみました。 Goのエラーに関するAPIを学ぶ - CLOVER🍀 xerrorsパッケージが持っている機能のうち、ほとんどのものはerr