Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
Signed-off-by: D4ryl00 <[email protected]>
  • Loading branch information
D4ryl00 committed Mar 29, 2024
1 parent 45029be commit ec91d1a
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
golang 1.21.8
golangci-lint 1.50.1
golangci-lint 1.54.2
16 changes: 8 additions & 8 deletions entry/fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const (
taskKindDone
)

func noopShouldExclude(hash cid.Cid) bool {
func noopShouldExclude(_ cid.Cid) bool {
return false
}

Expand Down Expand Up @@ -117,11 +117,11 @@ func (f *Fetcher) processQueue(ctx context.Context, hashes []cid.Cid) []iface.IP

// run process
go func(hash cid.Cid) {
entry, err := f.fetchEntry(ctx, hash)
if err != nil { // nolint:staticcheck
// @FIXME(gfanton): log this
// fmt.Printf("unable to fetch entry: %s\n", err.Error())
}
entry, _ := f.fetchEntry(ctx, hash)
// if err != nil {
// @FIXME(gfanton): log this
// fmt.Printf("unable to fetch entry: %s\n", err.Error())
// }

// free process slot
f.processDone()
Expand Down Expand Up @@ -186,7 +186,7 @@ func (f *Fetcher) processQueue(ctx context.Context, hashes []cid.Cid) []iface.IP
return results
}

func (f *Fetcher) updateClock(ctx context.Context, entry, lastEntry iface.IPFSLogEntry) {
func (f *Fetcher) updateClock(_ context.Context, entry, lastEntry iface.IPFSLogEntry) {
f.muClock.Lock()

ts := entry.GetClock().GetTime()
Expand Down Expand Up @@ -222,7 +222,7 @@ func (f *Fetcher) exclude(hash cid.Cid) (yes bool) {
return
}

func (f *Fetcher) addNextEntry(ctx context.Context, queue processQueue, entry iface.IPFSLogEntry, results []iface.IPFSLogEntry) {
func (f *Fetcher) addNextEntry(_ context.Context, queue processQueue, entry iface.IPFSLogEntry, results []iface.IPFSLogEntry) {
ts := entry.GetClock().GetTime()

if f.length < 0 {
Expand Down
2 changes: 1 addition & 1 deletion identityprovider/orbitdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type OrbitDBIdentityProvider struct {
}

// VerifyIdentity checks an OrbitDB identity.
func (p *OrbitDBIdentityProvider) VerifyIdentity(identity *Identity) error {
func (p *OrbitDBIdentityProvider) VerifyIdentity(_ *Identity) error {
return nil
}

Expand Down
2 changes: 1 addition & 1 deletion io/jsonable/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func (c *IdentitySignature) ToPlain() (*identityprovider.IdentitySignature, erro
}, nil
}

func (e *EntryV0) ToPlain(out iface.IPFSLogEntry, provider identityprovider.Interface, newClock func() iface.IPFSLogLamportClock) error {
func (e *EntryV0) ToPlain(out iface.IPFSLogEntry, _ identityprovider.Interface, newClock func() iface.IPFSLogLamportClock) error {
c := cid.Undef

if e.Hash != nil {
Expand Down
2 changes: 1 addition & 1 deletion io/pb/pb.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ type pb struct {
refEntry iface.IPFSLogEntry
}

func (p *pb) Write(ctx context.Context, ipfs coreiface.CoreAPI, obj interface{}, opts *iface.WriteOpts) (cid.Cid, error) {
func (p *pb) Write(ctx context.Context, ipfs coreiface.CoreAPI, obj interface{}, _ *iface.WriteOpts) (cid.Cid, error) {
var err error
payload := []byte(nil)

Expand Down

0 comments on commit ec91d1a

Please sign in to comment.