imjasonh / ideas

A place for me to file issues against myself for things I want to build when I'm bored
5 stars 0 forks source link

Make a go.mod that depends on everything #109

Open imjasonh opened 2 years ago

imjasonh commented 2 years ago

Inspired by https://github.com/ftdebugger/whole-npm (no updates for 7 years) and https://www.npmjs.com/package/all-the-package-names (last update 4 hours ago), construct a go.mod file that depends on every public Go module.

The idea is to poll https://index.golang.org/index and construct a go.mod file that contains every unique package it sees.

It could also keep everything up to date, because software supply chain security is important dammit.


index.golang.org - an index which serves a feed of new module versions that become available by proxy.golang.org. The feed can be viewed at https://index.golang.org/index. The feed is served as new line delimited JSON, providing the module path (as Path), the module version (as Version), and the time it was first cached by proxy.golang.org (as Timestamp). The list is sorted in chronological order. There are two optional parameters:

If you use the index to download many modules from the module mirror, you will want to set the Disable-Module-Fetch header, described above.