## [[errors.Is]]はインスタンス同士の同値性を調べる
```go
if err != nil {
switch {
case errors.Is(err, your.ERRCODE):
//...
}
}
```
## [[errors.As]]はインスタンスの型を調べる
```go
var yourErr *YourError
if errors.As(err, &yourErr) {
switch {
//...
}
}
```
## 参考
- [errors\.Is, errors\.As は(単なる)比較関数ではない](https://zenn.dev/spiegel/articles/20200926-error-handling-with-golang#fn1)