Repository navigation
fix: require module path boundaries when matching packages - #7957
Merged
steadytao merged 1 commit intoSep 13, 2026
Merged
Conversation
wangjingshuiku
force-pushed
the
wangjingshuiku-maint-20260824
branch
from
August 24, 2026 17:17
3dac9c2 to
31be607
Compare
Member
|
Could you remove the unrelated DualStack removal and TLS loader formatting changes? |
wangjingshuiku
force-pushed
the
wangjingshuiku-maint-20260824
branch
from
September 12, 2026 08:26
31be607 to
8c182d9
Compare
Contributor
Author
@steadytao Removed. Please review it again. Thanks! |
steadytao
requested changes
Sep 12, 2026
Signed-off-by: wangjingshuiku <wangjingshuiku@163.com>
wangjingshuiku
force-pushed
the
wangjingshuiku-maint-20260824
branch
from
September 12, 2026 16:20
8c182d9 to
3bd0e26
Compare
This was referenced Sep 30, 2026
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.
Assistance Disclosure
AI-assisted by OpenAI Codex and Kiro(Review again); I reviewed and tested the change.
Summary
getModulescurrently uses a raw string-prefix check when associating a package with a module. As a result, a module such asexample.com/modcan be selected for the unrelated packageexample.com/module.This change requires either an exact module-path match or a slash boundary, while retaining longest-match selection for nested modules. The table-driven test covers a module root, a child package, and an unrelated shared prefix.
Testing
go test ./cmd -run TestModuleContainsPackage -count=1