3 ms·
Indirect require section in go.mod file is essentially a lockfile. Once decision is made by tool, it's codified for future builds.
by vl 1y ago
Indirect require section in go.mod file is essentially a lockfile. Once decision is made by tool, it's codified for future builds.
- maxmcd 1y agoThe //indirect dependencies I believe are just there to track dependencies that are not in the project, or to help with caching: https://github.com/golang/go/issues/36460 https://github.com/golang/go/issues/36460 In go 1.17 they were added so that project loading did not require downloading the go.mod of every dependency in the graph.
- arccy 1y agoThe decision process is deterministic and requires no human input, it's only there for caching / speed, so it's not like a traditional lockfile. You can delete the indirect section and it will be reconstructed exactly as before.