From 6c332129cb5cc1f6dc60efee84a6ea3c8b7f0271 Mon Sep 17 00:00:00 2001 From: Julie Qiu Date: Tue, 23 Apr 2019 17:32:59 -0400 Subject: [PATCH] internal/fetch: increase maxFileSize to 30MB Change-Id: Ifa29e566071bca30ce296d8a7cb9bb36746d7994 Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/453201 Reviewed-by: Robert Findley --- internal/fetch/fetch.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/fetch/fetch.go b/internal/fetch/fetch.go index dfaf4d3b..e9a08033 100644 --- a/internal/fetch/fetch.go +++ b/internal/fetch/fetch.go @@ -38,7 +38,7 @@ var ( // maxFileSize is the maximum filesize that is allowed for reading. // If a .go file is encountered that exceeds maxFileSize, the fetch request // will fail. All other filetypes will be ignored. - maxFileSize = uint64(1e7) + maxFileSize = uint64(3e7) maxPackagesPerModule = 10000 maxImportsPerPackage = 1000 ) @@ -226,7 +226,7 @@ func extractModuleFiles(workDir, modulePath string, r *zip.Reader) error { } if !f.FileInfo().IsDir() { - // Skip files that are not .go files and are greater than 10MB. + // Skip files that are not .go files and are greater than maxFileSize. if filepath.Ext(f.Name) != ".go" && f.UncompressedSize64 > maxFileSize { continue }