-
Notifications
You must be signed in to change notification settings - Fork 26
Improve Quick fix #1702
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
Improve Quick fix #1702
Changes from 31 commits
4114722
5df3fbd
f70edd1
c28adf0
d517e89
46072e5
855294b
5ac2469
af4d0ab
96579c4
1fb83db
11a7839
750bc72
8db9188
6a0cf42
459494b
18475c3
d5bdefa
af066c2
34aefed
24c38e4
12451c9
b7e39e2
8da14dd
830c345
456ae95
bef95f7
97457a6
3a8a019
7c57e7e
262fd97
f12051f
6a87fdd
efa3656
dd6f618
d445b61
69efdcd
98e1778
ac300c3
3018dd4
698456b
967d230
42a9a66
c1d527f
d308d8f
4262931
e9eb1f0
12a0f31
873f0da
247f81e
985c182
49ee1bf
4464e87
fd95052
9293d96
9457595
ec72a22
f0a78e2
55d1f85
24d9d06
acf999c
9cf29c9
0926b9c
58bb714
1552a80
f9d1fcf
701aff6
700bafb
eeb2eaa
eaf2f32
3a30413
c0f7377
006822c
27bfc3e
ea69fa5
6f421d3
1f5e63c
e80c89e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,87 @@ | ||||||||||||||
| // Copyright 2026 lars hermges @ l3montree GmbH | ||||||||||||||
|
|
||||||||||||||
| // This program is free software: you can redistribute it and/or modify | ||||||||||||||
| // it under the terms of the GNU Affero General Public License as | ||||||||||||||
| // published by the Free Software Foundation, either version 3 of the | ||||||||||||||
| // License, or (at your option) any later version. | ||||||||||||||
| // | ||||||||||||||
| // This program is distributed in the hope that it will be useful, | ||||||||||||||
| // but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||||||||||
| // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||||||||||||
| // GNU Affero General Public License for more details. | ||||||||||||||
| // | ||||||||||||||
| // You should have received a copy of the GNU Affero General Public License | ||||||||||||||
| // along with this program. If not, see <https://www.gnu.org/licenses/>. | ||||||||||||||
|
|
||||||||||||||
| package main | ||||||||||||||
|
|
||||||||||||||
| import ( | ||||||||||||||
| "fmt" | ||||||||||||||
| "net/http" | ||||||||||||||
| "strings" | ||||||||||||||
| "time" | ||||||||||||||
| ) | ||||||||||||||
|
|
||||||||||||||
| type RegistryRequest struct { | ||||||||||||||
| Dependency string | ||||||||||||||
| Version string // empty string means "all versions" | ||||||||||||||
| } | ||||||||||||||
|
|
||||||||||||||
| var httpClient = &http.Client{ | ||||||||||||||
| Timeout: 30 * time.Second, | ||||||||||||||
| } | ||||||||||||||
|
|
||||||||||||||
|
||||||||||||||
| var ( | |
| _ = timeoutDetection | |
| _ = VersionExists | |
| ) |
Copilot
AI
Feb 13, 2026
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.
The comment says this trims quotes, but strings.Trim(pkg.Version, "/") only removes slashes. Either update the normalization (likely align it with normalizeVersion in quickfix.go) or fix the comment so it matches the actual behavior.
| normalizedVersion := strings.Trim(pkg.Version, "/") // remove quotes if present | |
| normalizedVersion := strings.Trim(pkg.Version, "/") // remove leading/trailing slashes if present |
Copilot
AI
Feb 13, 2026
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.
The comment says "remove quotes if present", but strings.Trim(pkg.Version, "/") removes slashes, not quotes. Either adjust the trimming to match the intended behavior (e.g., trim quotes/whitespace) or update the comment to avoid misleading future changes.
| normalizedVersion := strings.Trim(pkg.Version, "/") // remove quotes if present | |
| normalizedVersion := strings.Trim(pkg.Version, " \"'") // remove surrounding quotes/whitespace if present |
Copilot
AI
Feb 18, 2026
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.
This check may cause issues. If an error occurs during the HTTP request (err != nil), the req variable will be nil, causing a panic when trying to call req.Body.Close(). The nil check should come before attempting to close the body.
Uh oh!
There was an error while loading. Please reload this page.