Skip to content

Commit a642af6

Browse files
committed
chore: update Golang version on the CI jobs and fix lint errors
Signed-off-by: D4ryl00 <[email protected]>
1 parent 3d95190 commit a642af6

File tree

6 files changed

+22
-22
lines changed

6 files changed

+22
-22
lines changed

Diff for: .github/workflows/go.yml

+10-10
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,18 @@ jobs:
1414
strategy:
1515
matrix:
1616
golang:
17-
- '1.19.x'
17+
- "1.21.x"
1818
steps:
19-
- uses: actions/checkout@v3
19+
- uses: actions/checkout@v4
2020
- name: Set up Go
21-
uses: actions/setup-go@v4
21+
uses: actions/setup-go@v5
2222
with:
2323
go-version: ${{ matrix.golang }}
24+
cache: false
2425
- name: golangci-lint
25-
uses: golangci/golangci-lint-action@v3.3.0
26+
uses: golangci/golangci-lint-action@v4
2627
with:
27-
go-version: ${{ matrix.golang }}
28-
version: v1.50.1
28+
version: v1.54
2929
args: --timeout=10m
3030
# only-new-issues: true
3131

@@ -34,8 +34,8 @@ jobs:
3434
strategy:
3535
matrix:
3636
golang:
37-
- '1.19'
38-
- '1.20'
37+
- "1.21"
38+
- "1.22"
3939
env:
4040
OS: ubuntu-latest
4141
GOLANG: ${{ matrix.golang }}
@@ -80,8 +80,8 @@ jobs:
8080
strategy:
8181
matrix:
8282
golang:
83-
- '1.19'
84-
- '1.20'
83+
- "1.21"
84+
- "1.22"
8585
env:
8686
OS: macos-latest
8787
GOLANG: ${{ matrix.golang }}

Diff for: .tool-versions

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
golang 1.21.8
2-
golangci-lint 1.50.1
2+
golangci-lint 1.54.2

Diff for: entry/fetcher.go

+8-8
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const (
2121
taskKindDone
2222
)
2323

24-
func noopShouldExclude(hash cid.Cid) bool {
24+
func noopShouldExclude(_ cid.Cid) bool {
2525
return false
2626
}
2727

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

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

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

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

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

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

228228
if f.length < 0 {

Diff for: identityprovider/orbitdb.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type OrbitDBIdentityProvider struct {
1515
}
1616

1717
// VerifyIdentity checks an OrbitDB identity.
18-
func (p *OrbitDBIdentityProvider) VerifyIdentity(identity *Identity) error {
18+
func (p *OrbitDBIdentityProvider) VerifyIdentity(_ *Identity) error {
1919
return nil
2020
}
2121

Diff for: io/jsonable/types.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ func (c *IdentitySignature) ToPlain() (*identityprovider.IdentitySignature, erro
7373
}, nil
7474
}
7575

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

7979
if e.Hash != nil {

Diff for: io/pb/pb.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ type pb struct {
2020
refEntry iface.IPFSLogEntry
2121
}
2222

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

0 commit comments

Comments
 (0)