Skip to content

Commit

Permalink
doc: update
Browse files Browse the repository at this point in the history
  • Loading branch information
DenChenn committed Sep 6, 2023
1 parent 245cc28 commit ebbbeaf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,15 @@ blunder.yaml
Which can be import into your code like this:
```go
if err != nil {
if errors.As(err, &alayer.Err1) {
if errors.Is(err, &alayer.Err1) {
//...
}
}
```

Or you can wrap your error like this:
```go
if errors.As(err, &pgx.ErrNoRows) {
if errors.Is(err, &pgx.ErrNoRows) {
return &alayer.Err1.Wrap(err)
}
```

0 comments on commit ebbbeaf

Please sign in to comment.