Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go: [1.18, 1.19]
go: ["1.22", "1.23"]
steps:
- name: Check out source
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Set up Go
uses: actions/setup-go@84cbf8094393cdc5fe1fe1671ff2647332956b1a #v3.2.1
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version: ${{ matrix.go }}
- name: Check out source
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b #v3.0.2
- name: Install Linters
run: "curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.48.0"
run: "go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.60.1"
- name: Build
run: go build ./...
- name: Lint
run: |
golangci-lint run --disable-all --deadline=10m --enable=gofmt --enable=govet --enable=gosimple --enable=unconvert --enable=ineffassign
golangci-lint run
- name: Test
run: go test -v ./...
29 changes: 29 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
run:
deadline: 10m

linters:
disable-all: true
enable:
- asciicheck
- bidichk
- bodyclose
- dupword
- durationcheck
- errchkjson
- errorlint
- exportloopref
- gofmt
- goimports
- gosimple
- govet
- grouper
- ineffassign
- misspell
- nilerr
- nosprintfhostport
- reassign
- rowserrcheck
- tparallel
- typecheck
- unconvert
- unused
4 changes: 3 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,9 @@ func (d *dcrinstallManifest) fakedist(dist *dist) {
log.Fatal(err)
}
hash.Reset()
io.Copy(hash, fi)
if _, err = io.Copy(hash, fi); err != nil {
log.Fatalf("copy failed: %v", err)
}
fi.Close()
sum := hash.Sum(nil)
_, err = fmt.Fprintf(w, "%x %s\n", sum, u)
Expand Down