1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-31 05:04:23 +03:00

Fix monitor on go 1.19 (#2908)

* Fix monitor on go 1.19

* Remove exmaple tests when go 1.19

* Fix typo

* Fix typo

* Skip exmaple test

* Skip exmaple test

* Guard Peek call with mutex for thread safety
This commit is contained in:
ofekshenawa
2024-03-21 10:48:31 +02:00
committed by GitHub
parent a923df1984
commit 34dacf14a7
4 changed files with 62 additions and 2 deletions

View File

@ -1,7 +1,12 @@
GO_MOD_DIRS := $(shell find . -type f -name 'go.mod' -exec dirname {} \; | sort)
test: testdeps
$(eval GO_VERSION := $(shell go version | cut -d " " -f 3 | cut -d. -f2))
set -e; for dir in $(GO_MOD_DIRS); do \
if echo "$${dir}" | grep -q "./example" && [ "$(GO_VERSION)" = "19" ]; then \
echo "Skipping go test in $${dir} due to Go version 1.19 and dir contains ./example"; \
continue; \
fi; \
echo "go test in $${dir}"; \
(cd "$${dir}" && \
go mod tidy -compat=1.18 && \