From 6af88e80af735d6f88e5bcc5ce81259314b603ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E8=8C=B6=E6=B8=85=E6=AC=A2?= Date: Tue, 14 Jun 2022 20:04:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96go=20cmd=20path=20=E7=9A=84?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- golang.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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, } }