internal/build: ignore some files in FindMainPackages (#27521)

pull/27523/head
Delweng 1 year ago committed by GitHub
parent b1ef0bfe03
commit 84b05d4f34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      internal/build/util.go

@ -197,6 +197,9 @@ func FindMainPackages(dir string) []string {
}
for _, cmd := range cmds {
pkgdir := filepath.Join(dir, cmd.Name())
if !cmd.IsDir() {
continue
}
pkgs, err := parser.ParseDir(token.NewFileSet(), pkgdir, nil, parser.PackageClauseOnly)
if err != nil {
log.Fatal(err)

Loading…
Cancel
Save