diff --git a/golang.go b/golang.go index 24d7077..2ca995d 100644 --- a/golang.go +++ b/golang.go @@ -19,10 +19,13 @@ import ( // Author : go_developer@163.com<白茶清欢> // // Date : 20:04 2022/5/22 -func Golang(workDir string) *golang { +func Golang(workDir string, goCmdPath string) *golang { + if len(goCmdPath) == 0 { + goCmdPath = "go" + } return &golang{ workDir: workDir, - goCmdPath: "go", + goCmdPath: goCmdPath, } }