mirror of
https://github.com/imjasonh/lotsadeps
synced 2026-07-07 00:33:29 +00:00
No description
|
|
||
|---|---|---|
| .github/workflows | ||
| .gitignore | ||
| go.mod | ||
| go.sum | ||
| main.go | ||
| README.md | ||
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
- Fetches batches of entries from
index.golang.org/index - For each module, resolves the latest version via
proxy.golang.org - Validates the module path and version using
golang.org/x/mod - Deduplicates and writes unique
requiredirectives to the output file