From b872c60e1ca826913a918c1a74adc6f1d777ef12 Mon Sep 17 00:00:00 2001 From: "Michael B. Gale" Date: Wed, 5 Mar 2025 00:18:58 +0000 Subject: [PATCH] Go: Support more dependency managers in `IsGolangVendorDirectory` --- go/extractor/util/util.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/go/extractor/util/util.go b/go/extractor/util/util.go index fd3eed3e187f..5cb97a7bc1d6 100644 --- a/go/extractor/util/util.go +++ b/go/extractor/util/util.go @@ -307,5 +307,8 @@ func fileExists(path string) bool { // and contains a `modules.txt` file. func IsGolangVendorDirectory(dirPath string) bool { return filepath.Base(dirPath) == "vendor" && - (fileExists(filepath.Join(dirPath, "modules.txt")) || fileExists(filepath.Join(dirPath, "../glide.yaml"))) + (fileExists(filepath.Join(dirPath, "modules.txt")) || + fileExists(filepath.Join(dirPath, "../glide.yaml")) || + fileExists(filepath.Join(dirPath, "../Gopkg.lock")) || + fileExists(filepath.Join(dirPath, "../vendor.conf"))) }