Add separate go.mod files to use it with deprecated 1.16

This commit is contained in:
Thomas Roehl
2022-05-25 15:35:11 +02:00
parent f8d91d9cf1
commit 132ebabd45
4 changed files with 58 additions and 2 deletions

View File

@@ -23,6 +23,11 @@ all: $(APP)
$(APP): $(GOSRC)
make -C collectors
if [ "$(shell go version | cut -d' ' -f 3 | cut -d '.' -f1-2)" == "go1.16" ]; then \
cp go.mod.1.16 go.mod; \
else \
cp go.mod.1.17+ go.mod; \
fi
go get
go build -o $(APP) $(GOSRC_APP)