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) +}