Skip to content

Commit

Permalink
chore: update Golang version on the CI jobs and fix lint errors
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 3d95190 commit a642af6
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 22 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@ jobs:
strategy:
matrix:
golang:
- '1.19.x'
- "1.21.x"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.golang }}
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v3.3.0
uses: golangci/golangci-lint-action@v4
with:
go-version: ${{ matrix.golang }}
version: v1.50.1
version: v1.54
args: --timeout=10m
# only-new-issues: true

Expand All @@ -34,8 +34,8 @@ jobs:
strategy:
matrix:
golang:
- '1.19'
- '1.20'
- "1.21"
- "1.22"
env:
OS: ubuntu-latest
GOLANG: ${{ matrix.golang }}
Expand Down Expand Up @@ -80,8 +80,8 @@ jobs:
strategy:
matrix:
golang:
- '1.19'
- '1.20'
- "1.21"
- "1.22"
env:
OS: macos-latest
GOLANG: ${{ matrix.golang }}
Expand Down
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 a642af6

Please sign in to comment.