build: upgrade dependency and build with go 1.21

This commit is contained in:
2023-08-21 23:15:03 +02:00
parent adb38c3820
commit 993cfaa9d4
353 changed files with 47533 additions and 16238 deletions

21
vendor/go.uber.org/zap/Makefile generated vendored
View File

@ -1,13 +1,14 @@
export GOBIN ?= $(shell pwd)/bin
GOLINT = $(GOBIN)/golint
REVIVE = $(GOBIN)/revive
STATICCHECK = $(GOBIN)/staticcheck
GOVULNCHECK = $(GOBIN)/govulncheck
BENCH_FLAGS ?= -cpuprofile=cpu.pprof -memprofile=mem.pprof -benchmem
# Directories containing independent Go modules.
#
# We track coverage only for the main module.
MODULE_DIRS = . ./benchmarks ./zapgrpc/internal/test
MODULE_DIRS = . ./exp ./benchmarks ./zapgrpc/internal/test
# Many Go tools take file globs or directories as arguments instead of packages.
GO_FILES := $(shell \
@ -18,14 +19,15 @@ GO_FILES := $(shell \
all: lint test
.PHONY: lint
lint: $(GOLINT) $(STATICCHECK)
lint: $(REVIVE) $(STATICCHECK)
@rm -rf lint.log
@echo "Checking formatting..."
@gofmt -d -s $(GO_FILES) 2>&1 | tee lint.log
@echo "Checking vet..."
@$(foreach dir,$(MODULE_DIRS),(cd $(dir) && go vet ./... 2>&1) &&) true | tee -a lint.log
@echo "Checking lint..."
@$(foreach dir,$(MODULE_DIRS),(cd $(dir) && $(GOLINT) ./... 2>&1) &&) true | tee -a lint.log
@$(foreach dir,$(MODULE_DIRS),(cd $(dir) && \
$(REVIVE) -set_exit_status ./... 2>&1) &&) true | tee -a lint.log
@echo "Checking staticcheck..."
@$(foreach dir,$(MODULE_DIRS),(cd $(dir) && $(STATICCHECK) ./... 2>&1) &&) true | tee -a lint.log
@echo "Checking for unresolved FIXMEs..."
@ -40,8 +42,11 @@ lint: $(GOLINT) $(STATICCHECK)
git --no-pager diff; \
fi
$(GOLINT):
cd tools && go install golang.org/x/lint/golint
$(REVIVE):
cd tools && go install github.com/mgechev/revive
$(GOVULNCHECK):
cd tools && go install golang.org/x/vuln/cmd/govulncheck
$(STATICCHECK):
cd tools && go install honnef.co/go/tools/cmd/staticcheck
@ -71,3 +76,7 @@ updatereadme:
.PHONY: tidy
tidy:
@$(foreach dir,$(MODULE_DIRS),(cd $(dir) && go mod tidy) &&) true
.PHONY: vulncheck
vulncheck: $(GOVULNCHECK)
$(GOVULNCHECK) ./...