Skip to content

Commit 020eb4a

Browse files
committed
Go: Use slices.Concat for bazelPaths
1 parent 040a288 commit 020eb4a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

go/extractor/project/project.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -471,8 +471,10 @@ func getBuildRoots(emitDiagnostics bool) (goWorkspaces []GoWorkspace, totalModul
471471

472472
// Finds Go workspaces in the current working directory.
473473
func GetWorkspaceInfo(emitDiagnostics bool) []GoWorkspace {
474-
bazelPaths := util.FindAllFilesWithName(".", "BUILD", "vendor")
475-
bazelPaths = append(bazelPaths, util.FindAllFilesWithName(".", "BUILD.bazel", "vendor")...)
474+
bazelPaths := slices.Concat(
475+
util.FindAllFilesWithName(".", "BUILD", "vendor"),
476+
util.FindAllFilesWithName(".", "BUILD.bazel", "vendor"),
477+
)
476478
if len(bazelPaths) > 0 {
477479
// currently not supported
478480
if emitDiagnostics {

0 commit comments

Comments
 (0)