增加swag init
This commit is contained in:
parent
dad4d5728d
commit
e1935738dc
11
golang.go
11
golang.go
@ -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)
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user