|author||Jay Conrod <firstname.lastname@example.org>||Wed Sep 08 13:50:32 2021 -0700|
|committer||Russ Cox <email@example.com>||Wed Sep 22 20:26:12 2021 +0000|
[release-branch.go1.17] modfile: in SetRequireSeparateIndirect, convert lines to blocks When reading go.mod, SetRequireSeparateIndirect will insert new requirements into the last uncommented direct-only or indirect-only block OR line. If the last such statement is a line, SetRequireSeparateIndirect converts it to a block before inserting new requirements. Cleanup will convert it back to a line later if no requirements are inserted. For golang/go#47756 Change-Id: Id8ee3b0ce2d005488ddb3d9a5349115bd93938e7 Reviewed-on: https://go-review.googlesource.com/c/mod/+/348576 Trust: Jay Conrod <firstname.lastname@example.org> Run-TryBot: Jay Conrod <email@example.com> TryBot-Result: Go Bot <firstname.lastname@example.org> Reviewed-by: Bryan C. Mills <email@example.com> Reviewed-by: Michael Matloob <firstname.lastname@example.org> (cherry picked from commit 37dd6891021a152661f432ba5349c6527c243c02) Reviewed-on: https://go-review.googlesource.com/c/mod/+/351318
This repository holds packages for writing tools that work directly with Go module mechanics. That is, it is for direct manipulation of Go modules themselves.
It is NOT about supporting general development tools that need to do things like load packages in module mode. That use case, where modules are incidental rather than the focus, should remain in x/tools, specifically x/tools/go/packages.
The specific case of loading packages should still be done by invoking the go command, which remains the single point of truth for package loading algorithms.