|author||Jay Conrod <email@example.com>||Wed Sep 08 13:50:32 2021 -0700|
|committer||Jay Conrod <firstname.lastname@example.org>||Mon Sep 13 21:58:16 2021 +0000|
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#47733 Change-Id: Id8ee3b0ce2d005488ddb3d9a5349115bd93938e7 Reviewed-on: https://go-review.googlesource.com/c/mod/+/348576 Trust: Jay Conrod <email@example.com> Run-TryBot: Jay Conrod <firstname.lastname@example.org> TryBot-Result: Go Bot <email@example.com> Reviewed-by: Bryan C. Mills <firstname.lastname@example.org> Reviewed-by: Michael Matloob <email@example.com>
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.