Repository navigation
feat: read the go line from go.work with --work - #8
Open
ducnhan123-co wants to merge 1 commit into
Open
ducnhan123-co wants to merge 1 commit into
ducnhan123-co wants to merge 1 commit into
Conversation
Add a --work mode that reads the go line from go.work, copies go.work and go.work.sum, rewrites relative use and local replace paths, and lists every workspace module. The report uses //go:debug directives instead of a go.mod godebug block, because go.work has no godebug lines. Closes GillMacedo#4.
GillMacedo
requested changes
Nov 2, 2026
GillMacedo
left a comment
Owner
There was a problem hiding this comment.
Automated check, before a person reads this PR. Please fix the following and push again:
- It changes files that can't be merged through this automated process: .claude-plugin/marketplace.json, plugin/.claude-plugin/plugin.json. Please remove those changes and push again.
Thanks for contributing. The rules are in CONTRIBUTING.md.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Issue
Closes #4
What changed
Add
--workfor workspace mode. It reads the go line fromgo.work, copiesgo.work/go.work.sumto a temporary file, rewrites relativeuseand localreplacepaths to absolute paths, and lists each workspace module withgo listandGOWORKpointing at the copy.The report says
in workspaceand, becausego.workhas nogodebuglines, prints//go:debugdirectives (orGODEBUG) instead of ago.modblock. Modulegodebuglines are noted as ignored in workspace mode.Added
examples/workspace(two modules), unit tests for reading/copyinggo.workand resolving a workspace, and an integration test that checks both binaries and thatgo.workis unchanged.Why
In workspace mode the go line in
go.worksets GODEBUG defaults. The tool previously only noted an activego.workand ignored it, so it could not answer the question for multi-module repositories.Checklist
make testpassesROADMAP.mdand docs updated if relevantImplemented with help from an AI coding agent; I reviewed and tested the result.