From 778992eeb986096e26dff2a60ca170e1e6804558 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Wed, 18 May 2022 15:26:34 +0800 Subject: [PATCH] Fix vformat --- core/format.go | 1 + infra/vformat/main.go | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/format.go b/core/format.go index de6b7951..7d88c1c0 100644 --- a/core/format.go +++ b/core/format.go @@ -1,4 +1,5 @@ package core //go:generate go install -v github.com/daixiang0/gci@latest +//go:generate go install -v mvdan.cc/gofumpt@latest //go:generate go run ../infra/vformat/main.go -pwd ./.. diff --git a/infra/vformat/main.go b/infra/vformat/main.go index 4ea72ba6..e676f08a 100644 --- a/infra/vformat/main.go +++ b/infra/vformat/main.go @@ -134,7 +134,7 @@ func main() { if runtime.GOOS == "windows" { suffix = ".exe" } - gofmt := "gofmt" + suffix + gofmt := "gofumpt" + suffix goimports := "gci" + suffix if gofmtPath, err := exec.LookPath(gofmt); err != nil { @@ -183,8 +183,7 @@ func main() { } goimportsArgs := []string{ - "-w", - "-local", "github.com/xtls/xray-core", + "write", } RunMany(gofmt, gofmtArgs, rawFilesSlice)