From 72b9ee4182a9e6f95e23d2d8535b1cc641fdbd44 Mon Sep 17 00:00:00 2001 From: Shulhan Date: Tue, 8 Feb 2022 00:41:34 +0700 Subject: Makefile: set the CGO_ENABLED to 1 on go test command In case user set the CGO_ENABLED environment to 0, running "make all" will fail with the following error: go: -race requires cgo; enable cgo by setting CGO_ENABLED=1 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 074ea4b..fc41a87 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ .PHONY: all install all: - go test -race -failfast ./... + CGO_ENABLED=1 go test -race -failfast ./... install: go install ./cmd/gotp -- cgit v1.3