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:
5
Makefile
5
Makefile
@ -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 && \
|
||||
|
Reference in New Issue
Block a user