From b6b60bf5af8bb810379015f1af413bc7ef0b5d6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20Trma=C4=8D?= Date: Thu, 21 Mar 2024 20:13:48 +0100 Subject: [PATCH] Stop setting GO111MODULE=on MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It's the default since Go 1.16. In theory the environment might be setting it to off, and breaking our builds; unless something compelling comes up, I think that hypothetical environment should be changed, nowadays. Signed-off-by: Miloslav Trmač --- Makefile | 6 +++--- hack/validate.sh | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 66cd562d..9bdf578f 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,7 @@ BUILD_TAGS_DARWIN_CROSS = containers_image_openpgp BUILDTAGS = btrfs_noversion libdm_no_deferred_remove BUILDFLAGS := -tags "$(BUILDTAGS)" -PACKAGES := $(shell GO111MODULE=on go list $(BUILDFLAGS) ./...) +PACKAGES := $(shell go list $(BUILDFLAGS) ./...) SOURCE_DIRS = $(shell echo $(PACKAGES) | awk 'BEGIN{FS="/"; RS=" "}{print $$4}' | uniq) PREFIX ?= ${DESTDIR}/usr @@ -41,7 +41,7 @@ export PATH := $(PATH):${GOBIN} all: tools test validate .gitvalidation build: - GO111MODULE="on" go build $(BUILDFLAGS) ./... + go build $(BUILDFLAGS) ./... $(MANPAGES): %: %.md $(GOMD2MAN) -in $< -out $@ @@ -78,7 +78,7 @@ clean: rm -rf $(MANPAGES) test: - @GO111MODULE="on" go test $(BUILDFLAGS) -cover ./... + @go test $(BUILDFLAGS) -cover ./... fmt: @gofmt -l -s -w $(SOURCE_DIRS) diff --git a/hack/validate.sh b/hack/validate.sh index 078d34ff..b8dafb5e 100755 --- a/hack/validate.sh +++ b/hack/validate.sh @@ -15,7 +15,7 @@ if [[ -z $(type -P gofmt) ]]; then fi echo "Executing go vet" -GO111MODULE="on" go vet -tags="$BUILDTAGS" ./... +go vet -tags="$BUILDTAGS" ./... echo "Executing gofmt" OUTPUT=$(gofmt -s -l . | sed -e '/^vendor/d')