From e1935738dcea79e8d4c6c1bc71d12e11dcc9533a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E8=8C=B6=E6=B8=85=E6=AC=A2?= Date: Sun, 26 Jun 2022 19:48:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0swag=20init?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- golang.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/golang.go b/golang.go index a72fefd..5bcdf11 100644 --- a/golang.go +++ b/golang.go @@ -181,3 +181,14 @@ func (g *golang) FormatGoENV(sourceENV string) define.GoENV { _ = json.Unmarshal(byteData, &envResult) return envResult } + +// SwagInit 初始化swagger +// +// Author : go_developer@163.com<白茶清欢> +// +// Date : 19:45 2022/6/26 +func (g *golang) SwagInit(param []string) *define.Result { + envResult := g.GetGoENV() + swagCmdPath := envResult.GOPATH + "/bin/swag" + return Execute(g.workDir, swagCmdPath, param) +}