增加swag init

This commit is contained in:
白茶清欢 2022-06-26 19:48:30 +08:00
parent dad4d5728d
commit e1935738dc

View File

@ -181,3 +181,14 @@ func (g *golang) FormatGoENV(sourceENV string) define.GoENV {
_ = json.Unmarshal(byteData, &envResult) _ = json.Unmarshal(byteData, &envResult)
return 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)
}