Skip to content

Commit 7715453

Browse files
committed
ipfs: IPNS - leftover lint from API change
The IPFS subsystem used to be constructed from the core API if it was not optionally overridden. This option and the default construction logic were removed, and an `fs.FS` was added as a required parameter to the IPNS constructor; but the default field filler was not cleaned up after this change happened.
1 parent 3d3dedb commit 7715453

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

internal/filesystem/ipfs/ipns.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,14 @@ func NewIPNS(core coreiface.CoreAPI, ipfs fs.FS, options ...IPNSOption) (*IPNS,
7171
return nil, err
7272
}
7373
}
74-
if err := settings.fillInDefaults(core); err != nil {
74+
if err := settings.fillInDefaults(); err != nil {
7575
fsys.cancel()
7676
return nil, err
7777
}
7878
return fsys, nil
7979
}
8080

81-
func (settings *ipnsSettings) fillInDefaults(core coreiface.CoreAPI) error {
81+
func (settings *ipnsSettings) fillInDefaults() error {
8282
fsys := settings.IPNS
8383
if fsys.ctx == nil {
8484
fsys.ctx, fsys.cancel = context.WithCancel(context.Background())
@@ -92,9 +92,6 @@ func (settings *ipnsSettings) fillInDefaults(core coreiface.CoreAPI) error {
9292
if fsys.expiry == 0 {
9393
fsys.expiry = 1 * time.Minute
9494
}
95-
if fsys.ipfs != nil {
96-
return nil
97-
}
9895
return nil
9996
}
10097

0 commit comments

Comments
 (0)