1
0
Fork 0
mirror of https://github.com/imjasonh/lotsadeps synced 2026-07-07 00:33:29 +00:00
No description
Find a file
2026-04-12 11:03:01 -04:00
.github/workflows Use @latest versions and add CI workflow 2026-04-11 13:18:39 +00:00
.gitignore Add .gitignore for compiled binary 2026-04-11 00:35:38 +00:00
go.mod Use @latest versions and add CI workflow 2026-04-11 13:18:39 +00:00
go.sum Init Go module and fix main.go 2026-04-11 00:10:39 +00:00
main.go Use @latest versions and add CI workflow 2026-04-11 13:18:39 +00:00
README.md Add README describing what lotsadeps does and how to use it 2026-04-12 14:56:38 +00:00

lotsadeps

lotsadeps crawls the Go module proxy index to discover public Go modules, resolves each to its latest version, validates each module's go.mod, and generates a go.mod file with a large number of require directives.

This is useful for testing tooling that deals with dependency-heavy Go modules.

Usage

go run main.go [-max <n>] [-workers <n>] [-batch <n>] [-o <output>]
Flag Default Description
-max 0 (unlimited) Maximum number of index entries to fetch
-workers 20 Number of concurrent workers for module validation
-batch 2000 Number of index entries per request
-o go.mod Output file path

Example

# Crawl 10,000 index entries and write results to generated.gomod
go run main.go -max 10000 -o generated.gomod

How it works

  1. Fetches batches of entries from index.golang.org/index
  2. For each module, resolves the latest version via proxy.golang.org
  3. Validates the module path and version using golang.org/x/mod
  4. Deduplicates and writes unique require directives to the output file