go mod tidy 支持 -go=1.16 -go=1.17

This commit is contained in:
白茶清欢 2022-07-04 10:56:17 +08:00
parent 9584398b77
commit 903d1d9553

View File

@ -60,6 +60,8 @@ func (g *golang) ModInit(modPath string) *define.Result {
//
// Date : 20:17 2022/5/22
func (g *golang) ModTidy() *define.Result {
_ = Execute(g.workDir, g.goCmdPath, []string{"mod", "tidy", "-go=1.16"})
_ = Execute(g.workDir, g.goCmdPath, []string{"mod", "tidy", "-go=1.17"})
return Execute(g.workDir, g.goCmdPath, []string{"mod", "tidy"})
}