Skip to content

Fix Go module path separators in remediation commands#1348

Open
omribz156 wants to merge 1 commit into
jfrog:devfrom
omribz156:codex/go-module-path-separators
Open

Fix Go module path separators in remediation commands#1348
omribz156 wants to merge 1 commit into
jfrog:devfrom
omribz156:codex/go-module-path-separators

Conversation

@omribz156
Copy link
Copy Markdown

Summary:

  • Normalize Go module names reported with colon separators before building the go get remediation command.

  • Keep the normalization scoped to Go package updates so Maven-style coordinates are not affected.

  • Add coverage for slash-separated and colon-separated Go module paths.

  • All tests passed. If this feature is not already covered by the tests, I added new tests.

  • This pull request is on the dev branch.

  • I used gofmt for formatting the code before submitting the pull request.

  • Update documentation about new features / new supported technologies


Verification:

  • gofmt -w packagehandlers\gopackagehandler.go packagehandlers\packagehandlers_test.go
  • go test ./packagehandlers -run TestNormalizeGoModulePath -count=1
  • go test ./packagehandlers -run "TestNormalizeGoModulePath|TestUpdateDependency" -count=1 was also tried, but TestUpdateDependency requires JF_URL in this local environment.

Docs note: this is a bug fix for existing Go remediation behavior, not a new feature or new supported technology.

This was implemented with Codex assistance, with the final diff manually reviewed and kept focused on issue #1243.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant