From 1eb331511fae1d063fdd7e7408622a3e53d6b7c1 Mon Sep 17 00:00:00 2001 From: Dominic Della Valle Date: Thu, 25 May 2023 11:06:55 -0400 Subject: [PATCH] ipfs: lint - use Go 1.20's `errors.Join` --- internal/filesystem/ipfs/ipns.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/filesystem/ipfs/ipns.go b/internal/filesystem/ipfs/ipns.go index 0f8720a6..272de4c0 100644 --- a/internal/filesystem/ipfs/ipns.go +++ b/internal/filesystem/ipfs/ipns.go @@ -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 } @@ -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)