Skip to content

Commit

Permalink
fix: race condition (#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
nrwiersma authored Sep 1, 2023
1 parent 2bbc62e commit ccbc723
Show file tree
Hide file tree
Showing 6 changed files with 76 additions and 495 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:

strategy:
matrix:
go-version: [ 1.19, "1.20" ]
go-version: [ "1.20", "1.21" ]
runs-on: ubuntu-latest
env:
GOLANGCI_LINT_VERSION: v1.51.0
GOLANGCI_LINT_VERSION: v1.54.1

steps:
- name: Install Go
Expand Down
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ linters:
- structcheck # deprecated
- deadcode # deprecated
- ifshort # deprecated
- depguard
- exhaustive
- exhaustruct
- forcetypeassert
Expand Down
24 changes: 23 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,26 @@
include github.com/hamba/make/golang
# Format all files
fmt:
@echo "==> Formatting source"
@gofmt -s -w $(shell find . -type f -name '*.go' -not -path "./vendor/*")
@echo "==> Done"
.PHONY: fmt

# Tidy the go.mod file
tidy:
@echo "==> Cleaning go.mod"
@go mod tidy
@echo "==> Done"
.PHONY: tidy

# Run all tests
test:
@go test -cover -race ./...
.PHONY: test

# Lint the project
lint:
@golangci-lint run ./...
.PHONY: lint

# Generate Go files
generate:
Expand Down
22 changes: 21 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/hamba/statter/v2

go 1.16
go 1.20

require (
github.com/VictoriaMetrics/metrics v1.24.0
Expand All @@ -10,3 +10,23 @@ require (
github.com/stretchr/testify v1.8.4
github.com/valyala/fastrand v1.1.0
)

require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/go-stack/stack v1.8.1 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_model v0.3.0 // indirect
github.com/prometheus/common v0.42.0 // indirect
github.com/prometheus/procfs v0.10.1 // indirect
github.com/rogpeppe/go-internal v1.11.0 // indirect
github.com/stretchr/objx v0.5.0 // indirect
github.com/valyala/histogram v1.2.0 // indirect
golang.org/x/sys v0.8.0 // indirect
google.golang.org/protobuf v1.30.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit ccbc723

Please sign in to comment.