From 7fbc0df429658ebbba74bd5915b2b4092f6028bf Mon Sep 17 00:00:00 2001 From: Alexis Couvreur Date: Tue, 4 Oct 2022 14:41:39 +0000 Subject: [PATCH] fix: set gin to release mode --- Makefile | 4 ++-- main.go | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index bc4c997..b7a65dc 100644 --- a/Makefile +++ b/Makefile @@ -13,10 +13,10 @@ VPREFIX := github.com/acouvreur/sablier/version GO_LDFLAGS := -X $(VPREFIX).Branch=$(GIT_BRANCH) -X $(VPREFIX).Version=$(version) -X $(VPREFIX).Revision=$(GIT_REVISION) -X $(VPREFIX).BuildUser=$(shell whoami)@$(shell hostname) -X $(VPREFIX).BuildDate=$(shell date -u +"%Y-%m-%dT%H:%M:%SZ") $(PLATFORMS): - CGO_ENABLED=0 GIN_MODE=release GOOS=$(os) GOARCH=$(arch) go build -tags=nomsgpack -v -ldflags="${GO_LDFLAGS}" -o 'sablier_$(version)_$(os)-$(arch)' . + CGO_ENABLED=0 GOOS=$(os) GOARCH=$(arch) go build -tags=nomsgpack -v -ldflags="${GO_LDFLAGS}" -o 'sablier_$(version)_$(os)-$(arch)' . build: - CGO_ENABLED=0 GIN_MODE=release GOOS=$(os) GOARCH=$(arch) go build -tags=nomsgpack -v -ldflags="${GO_LDFLAGS}" -o 'sablier_$(version)_$(os)-$(arch)' . + CGO_ENABLED=0 GOOS=$(os) GOARCH=$(arch) go build -tags=nomsgpack -v -ldflags="${GO_LDFLAGS}" -o 'sablier_$(version)_$(os)-$(arch)' . release: $(PLATFORMS) .PHONY: release $(PLATFORMS) \ No newline at end of file diff --git a/main.go b/main.go index 4cb9b51..bc44064 100644 --- a/main.go +++ b/main.go @@ -2,8 +2,10 @@ package main import ( "github.com/acouvreur/sablier/cmd" + "github.com/gin-gonic/gin" ) func main() { + gin.SetMode(gin.ReleaseMode) cmd.Execute() }