mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-12-21 09:36:34 -05:00
Infra: use customized goimports (#949)
This commit is contained in:
parent
7e876709fe
commit
0fe129de65
@ -1,4 +1,4 @@
|
|||||||
package core
|
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/
|
//go:generate go run ./infra/vformat/
|
||||||
|
@ -154,7 +154,8 @@ func main() {
|
|||||||
filename := filepath.Base(path)
|
filename := filepath.Base(path)
|
||||||
if strings.HasSuffix(filename, ".go") &&
|
if strings.HasSuffix(filename, ".go") &&
|
||||||
!strings.HasSuffix(filename, ".pb.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)
|
rawFilesSlice = append(rawFilesSlice, path)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -171,6 +172,7 @@ func main() {
|
|||||||
|
|
||||||
goimportsArgs := []string{
|
goimportsArgs := []string{
|
||||||
"-w",
|
"-w",
|
||||||
|
"-r",
|
||||||
"-local", "github.com/v2fly/v2ray-core",
|
"-local", "github.com/v2fly/v2ray-core",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user