Skip to content

Commit

Permalink
go 1.23 version bump (#100)
Browse files Browse the repository at this point in the history
  • Loading branch information
vladopajic authored Aug 28, 2024
1 parent af428bc commit e3daf9d
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.59.1
version: v1.60.3
- name: go mod tidy check
uses: katexochen/go-tidy-check@v2
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ linters:
- containedctx
- contextcheck
- cyclop
- copyloopvar
- decorder
- dogsled
- dupl
Expand All @@ -21,7 +22,6 @@ linters:
- errname
- errorlint
- exhaustive
- exportloopref
- forbidigo
- forcetypeassert
- funlen
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# GO_VERSION: go version should match version in go.mod file
FROM golang:1.22 as builder
FROM golang:1.23 as builder
WORKDIR /workspace

COPY go.mod go.mod
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
GO ?= go
GOBIN ?= $$($(GO) env GOPATH)/bin
GOLANGCI_LINT ?= $(GOBIN)/golangci-lint
GOLANGCI_LINT_VERSION ?= v1.59.1
GOLANGCI_LINT_VERSION ?= v1.60.3

# Code tidy
.PHONY: tidy
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module github.com/vladopajic/go-test-coverage/v2

// GO_VERSION: when changing go version update version in other places
go 1.22
go 1.23

require (
github.com/alexflint/go-arg v1.4.3
Expand Down
6 changes: 3 additions & 3 deletions pkg/testcoverage/helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ func randStats(localPrefix string, minc, maxc int) []coverage.Stats {
}
}

func makeCoverageGenFn(min, max int) func() (total, covered int64) {
func makeCoverageGenFn(minc, maxc int) func() (total, covered int64) {
return func() (int64, int64) {
tc := rand.Intn(max-min+1) + min
tc := rand.Intn(maxc-minc+1) + minc
if tc == 0 {
return 0, 0
}
Expand All @@ -59,7 +59,7 @@ func makeCoverageGenFn(min, max int) func() (total, covered int64) {
total := int64(float64(100*covered) / float64(tc))

cp := coverage.CoveredPercentage(total, covered)
if cp >= min && cp <= max {
if cp >= minc && cp <= maxc {
return total, covered
}
}
Expand Down

0 comments on commit e3daf9d

Please sign in to comment.