From 3a211889daaa2a17e3ccb9d30446f8167bc65141 Mon Sep 17 00:00:00 2001 From: Tycho Andersen Date: Tue, 3 Sep 2019 14:21:05 -0600 Subject: [PATCH] install swag instead of updating it in the go deps go get -u does an update of the go.mod and go.sum files; go install installs the binary at that location. It seems the intent of this line in the makefile is to install swag if it doesn't exist based on the ||, so let's actually install it, instead of just updating the local deps. This also has the advantage of not immediately generating a diff when someone doesn't have swag installed. Signed-off-by: Tycho Andersen --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 0f49ab26..7028a77e 100644 --- a/Makefile +++ b/Makefile @@ -25,7 +25,7 @@ check: golangci-lint run --enable-all ./cmd/... ./pkg/... docs/docs.go: - swag -v || go get -u github.com/swaggo/swag/cmd/swag + swag -v || go install github.com/swaggo/swag/cmd/swag swag init -g pkg/api/routes.go .PHONY: doc