From d1a192159b65ca5a9296caec379fc5881d1d5273 Mon Sep 17 00:00:00 2001 From: mountain Date: Mon, 3 Jul 2023 14:12:21 +0900 Subject: [PATCH] =?UTF-8?q?=EC=84=9C=EB=B9=84=EC=8A=A4=20=ED=83=9C?= =?UTF-8?q?=EA=B7=B8=EB=A5=BC=20=ED=95=98=EC=9C=84=20=EB=B2=84=EC=A0=84?= =?UTF-8?q?=EC=97=90=EB=8F=84=20=EB=B6=99=EC=97=AC=EC=A4=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/http_api.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/server/http_api.go b/server/http_api.go index a6fe75b..dfec8ef 100644 --- a/server/http_api.go +++ b/server/http_api.go @@ -45,12 +45,13 @@ func (h *houstonHandler) GetDeploySources(w http.ResponseWriter, r *http.Request getVersions := func(name string) []string { var out []string vers, _ := os.ReadDir(path.Join(h.deployPath, name)) + mytags, _ := os.ReadFile(path.Join(h.deployPath, name, "@tags")) for _, fd := range vers { if fd.IsDir() { ver := fd.Name() files, _ := os.ReadDir(path.Join(h.deployPath, name, ver)) vertags, _ := os.ReadFile(path.Join(h.deployPath, name, ver, "@tags")) - ver = ver + string(vertags) + ver = ver + string(mytags) + string(vertags) if len(files) > 0 { for _, file := range files { @@ -66,10 +67,7 @@ func (h *houstonHandler) GetDeploySources(w http.ResponseWriter, r *http.Request out = append(out, ver) } } - mytags, _ := os.ReadFile(path.Join(h.deployPath, name, "@tags")) - if len(mytags) > 0 { - out = append(out, string(mytags)) - } + return out }