Skip to content

Commit

Permalink
ipfs: lint - use Go 1.20's errors.Join
Browse files Browse the repository at this point in the history
  • Loading branch information
djdv committed May 25, 2023
1 parent f08f3b2 commit 1eb3315
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/filesystem/ipfs/ipns.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ func (fsys *IPNS) Open(name string) (fs.File, error) {
if err := seekToSame(file, newFile); err != nil {
err = newFSError(op, name, err, fserrors.IO)
if cErr := newFile.Close(); cErr != nil {
err = fserrors.Join(err, cErr)
return errors.Join(err, cErr)
}
return err
}
Expand Down Expand Up @@ -419,7 +419,7 @@ func (nf *ipnsFile) ReadDir(count int) ([]fs.DirEntry, error) {
if info, sErr := file.Stat(); sErr == nil {
name = info.Name()
} else {
err = fserrors.Join(err, sErr)
err = errors.Join(err, sErr)
kind = fserrors.IO
}
return nil, newFSError("ReadDir", name, err, kind)
Expand Down

0 comments on commit 1eb3315

Please sign in to comment.