Skip to content

Commit b66f975

Browse files
committed
ipfs: use standard errors.ErrUnsupported
1 parent 1edbc1b commit b66f975

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

internal/filesystem/ipfs/ipns.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ func (nf *ipnsFile) Seek(offset int64, whence int) (int64, error) {
398398
if seeker, ok := nf.file.(io.Seeker); ok {
399399
return seeker.Seek(offset, whence)
400400
}
401-
return 0, fserrors.ErrUnsupported
401+
return 0, errors.ErrUnsupported
402402
}
403403

404404
func (nf *ipnsFile) Read(b []byte) (int, error) {

internal/filesystem/ipfs/resolve.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ package ipfs
22

33
import (
44
"context"
5+
"errors"
56

6-
fserrors "github.com/djdv/go-filesystem-utils/internal/filesystem/errors"
77
"github.com/ipfs/boxo/blockservice"
88
"github.com/ipfs/boxo/exchange"
99
bsfetcher "github.com/ipfs/boxo/fetcher/impl/blockservice"
@@ -64,19 +64,19 @@ func (getNodeFn fnBlockStore) GetSize(ctx context.Context, c cid.Cid) (int, erro
6464
func (fnBlockStore) HashOnRead(bool) {}
6565

6666
func (fnBlockStore) Put(context.Context, blocks.Block) error {
67-
return fserrors.ErrUnsupported
67+
return errors.ErrUnsupported
6868
}
6969

7070
func (fnBlockStore) PutMany(context.Context, []blocks.Block) error {
71-
return fserrors.ErrUnsupported
71+
return errors.ErrUnsupported
7272
}
7373

7474
func (fnBlockStore) AllKeysChan(ctx context.Context) (<-chan cid.Cid, error) {
75-
return nil, fserrors.ErrUnsupported
75+
return nil, errors.ErrUnsupported
7676
}
7777

7878
func (fnBlockStore) DeleteBlock(context.Context, cid.Cid) error {
79-
return fserrors.ErrUnsupported
79+
return errors.ErrUnsupported
8080
}
8181

8282
func (getNodeFn fnBlockFetcher) GetBlock(_ context.Context, c cid.Cid) (blocks.Block, error) {

0 commit comments

Comments
 (0)