-
Notifications
You must be signed in to change notification settings - Fork 89
Fix the golang package updater #997
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: v3_er
Are you sure you want to change the base?
Conversation
eyalk007
commented
Dec 15, 2025
- 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
packagehandlers/gopackagehandler.go
Outdated
|
|
||
| func (golang *GoPackageHandler) UpdateDependency(vulnDetails *utils.VulnerabilityDetails) error { | ||
| // Configure resolution from an Artifactory server if needed | ||
| if golang.depsRepo != "" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we want to stop support depsRepo, so those lines can be removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i say comment this needs to be back by q1 in my eyes
packagehandlers/gopackagehandler.go
Outdated
| ) | ||
|
|
||
| type GoPackageHandler struct { | ||
| CommonPackageHandler |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so we dont need and want the CommonPackageHandler right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i believe it should not exist
maybe in the future in a diff way with the parsing, but for now we should delete implementation package by package manager
| } | ||
|
|
||
| func (golang *GoPackageHandler) allowLockfileManipulation() []string { | ||
| return append(os.Environ(), "GOFLAGS=-mod=mod") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we have "GOFLAGS=-mod=mod" in a const in the beginning so it will be more clear which flags are being used for each package handler?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
feels like overkill
packagehandlers/gopackagehandler.go
Outdated
| "github.com/jfrog/jfrog-client-go/utils/log" | ||
| ) | ||
|
|
||
| type GoPackageHandler struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what do you think ti change the PackageHandler name to something more clear? for example "GolangFixPrCreator
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GolangPackageFixer
79d4322 to
5cd924b
Compare
7baec21 to
1df000e
Compare
- Delete old gopackagehandler.go - Add new gopackageupdater.go with improved Go module handling - Add v prefix support for Go modules - Add vendor directory support - Update commonpackagehandler.go with shared utilities
b5eabf9 to
31ed7b2
Compare