From da05c7808d9c8ef500e91bdb8f6455ec108952de Mon Sep 17 00:00:00 2001 From: Trong Huu Nguyen Date: Wed, 8 Mar 2023 12:55:17 +0100 Subject: [PATCH] build: add trimpath and ldflags to trim resulting binary --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 38dfe35..c6f8e8e 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ wonderwall: - go build -a -o bin/wonderwall cmd/wonderwall/main.go + go build -trimpath -ldflags "-s -w" -a -o bin/wonderwall cmd/wonderwall/main.go test: go test -count=1 ./... -coverprofile cover.out