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", "./*"}) +}