From 68b298a21d243342da043213006a4fbf962847a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E8=8C=B6=E6=B8=85=E6=AC=A2?= Date: Sun, 22 May 2022 22:09:38 +0800 Subject: [PATCH] =?UTF-8?q?go=20=E6=93=8D=E4=BD=9C=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- golang.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/golang.go b/golang.go index 31c8005..8f1c379 100644 --- a/golang.go +++ b/golang.go @@ -124,3 +124,12 @@ func (g *golang) GetRecommendGoProxyList() []string { "https://goproxy.cn/", // 基于七牛云CDN } } + +// FormatCode 格式化代码 +// +// Author : go_developer@163.com<白茶清欢> +// +// Date : 22:09 2022/5/22 +func (g *golang) FormatCode() *define.Result { + return Execute(g.workDir, g.goCmdPath, []string{"-w", "-l", "./*"}) +}