Refactor ./go modules, list project modules before plugins
#152
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Part of #150. This is the first step towards updating the output to match _GO_USE_MODULES behavior.
The first two commits are pure refactorings, using functions introduced in #120, updating the usage of
@go.pad_itemsand@go.zip_items, and extracting a helper function for./go modules --imported.The third commit fixes a latent bug in
@go.splitfrom thestringsmodule wherein items that contained newlines would not split correctly, as the input string would get truncated at the first newline.I discovered this
@go.splitbug while writing the fourth commit to add_GO_IMPORTED_MODULE_CALLERSinfo to./go modules --imported, which I included as a matter of convenience after extracting the helper function in the second commit.The fifth commit is the actual first step towards #150, whereby the project's local modules are listed before plugin modules. The next step will be to produce separate sections for internal (
_GO_SCRIPTS_DIR/lib) and public (_GO_ROOTDIR/lib) project modules.