Skip to content

Commit e8b1240

Browse files
committed
build: Test against Go 1.23
1 parent 58e9f2c commit e8b1240

File tree

3 files changed

+38
-7
lines changed

3 files changed

+38
-7
lines changed

.github/workflows/go.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,20 @@ jobs:
99
runs-on: ubuntu-latest
1010
strategy:
1111
matrix:
12-
go: [1.18, 1.19]
12+
go: ["1.22", "1.23"]
1313
steps:
14+
- name: Check out source
15+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
1416
- name: Set up Go
15-
uses: actions/setup-go@84cbf8094393cdc5fe1fe1671ff2647332956b1a #v3.2.1
17+
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
1618
with:
1719
go-version: ${{ matrix.go }}
18-
- name: Check out source
19-
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b #v3.0.2
2020
- name: Install Linters
21-
run: "curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.48.0"
21+
run: "go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.60.1"
2222
- name: Build
2323
run: go build ./...
2424
- name: Lint
2525
run: |
26-
golangci-lint run --disable-all --deadline=10m --enable=gofmt --enable=govet --enable=gosimple --enable=unconvert --enable=ineffassign
26+
golangci-lint run
2727
- name: Test
2828
run: go test -v ./...

.golangci.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
run:
2+
deadline: 10m
3+
4+
linters:
5+
disable-all: true
6+
enable:
7+
- asciicheck
8+
- bidichk
9+
- bodyclose
10+
- dupword
11+
- durationcheck
12+
- errchkjson
13+
- errorlint
14+
- exportloopref
15+
- gofmt
16+
- goimports
17+
- gosimple
18+
- govet
19+
- grouper
20+
- ineffassign
21+
- misspell
22+
- nilerr
23+
- nosprintfhostport
24+
- reassign
25+
- rowserrcheck
26+
- tparallel
27+
- typecheck
28+
- unconvert
29+
- unused

main.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,9 @@ func (d *dcrinstallManifest) fakedist(dist *dist) {
628628
log.Fatal(err)
629629
}
630630
hash.Reset()
631-
io.Copy(hash, fi)
631+
if _, err = io.Copy(hash, fi); err != nil {
632+
log.Fatalf("copy failed: %v", err)
633+
}
632634
fi.Close()
633635
sum := hash.Sum(nil)
634636
_, err = fmt.Fprintf(w, "%x %s\n", sum, u)

0 commit comments

Comments
 (0)