1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-30 05:56:54 -05:00

Infra: use customized goimports (#949)

This commit is contained in:
Loyalsoldier 2021-05-01 11:11:37 +08:00 committed by GitHub
parent 7e876709fe
commit 0fe129de65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -1,4 +1,4 @@
package core
//go:generate go install -v golang.org/x/tools/cmd/goimports@latest
//go:generate go install -v github.com/v2fly/tools/cmd/goimports@latest
//go:generate go run ./infra/vformat/

View File

@ -154,7 +154,8 @@ func main() {
filename := filepath.Base(path)
if strings.HasSuffix(filename, ".go") &&
!strings.HasSuffix(filename, ".pb.go") &&
!strings.Contains(dir, filepath.Join("testing", "mocks")) {
!strings.Contains(dir, filepath.Join("testing", "mocks")) &&
!strings.Contains(path, filepath.Join("main", "distro", "all", "all.go")) {
rawFilesSlice = append(rawFilesSlice, path)
}
@ -171,6 +172,7 @@ func main() {
goimportsArgs := []string{
"-w",
"-r",
"-local", "github.com/v2fly/v2ray-core",
}