From 366c55aa8bee3a7aeb603ec27bfea36c3f0fea3e Mon Sep 17 00:00:00 2001 From: Viacheslav Poturaev Date: Wed, 2 Aug 2023 01:19:35 +0200 Subject: [PATCH] Add more build targets, fix double response issue --- Makefile | 1 + cmd/swgui/swgui.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/Makefile b/Makefile index 7b6ca5b..3089d59 100644 --- a/Makefile +++ b/Makefile @@ -30,6 +30,7 @@ endif export CGO_ENABLED = 0 BUILD_LDFLAGS=-s -w BUILD_PKG = ./cmd/swgui +export RELEASE_TARGETS="darwin/amd64 darwin/arm64 linux/amd64 linux/arm64 windows/amd64" -include $(DEVGO_PATH)/makefiles/main.mk -include $(DEVGO_PATH)/makefiles/lint.mk diff --git a/cmd/swgui/swgui.go b/cmd/swgui/swgui.go index 001e104..77c8828 100644 --- a/cmd/swgui/swgui.go +++ b/cmd/swgui/swgui.go @@ -39,6 +39,8 @@ func main() { hh := http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) { if r.URL.Path == urlToSchema { http.ServeFile(rw, r, filePathToSchema) + + return } swh.ServeHTTP(rw, r)