fix: Address all errcheck and misspell linter errors

This commit is contained in:
Steve Yegge
2025-11-01 23:56:03 -07:00
parent a2361f85e7
commit 2b086951c4
15 changed files with 61 additions and 60 deletions

View File

@@ -438,10 +438,10 @@ func compareVersions(v1, v2 string) int {
// Get part value or default to 0 if part doesn't exist
if i < len(parts1) {
fmt.Sscanf(parts1[i], "%d", &p1)
_, _ = fmt.Sscanf(parts1[i], "%d", &p1)
}
if i < len(parts2) {
fmt.Sscanf(parts2[i], "%d", &p2)
_, _ = fmt.Sscanf(parts2[i], "%d", &p2)
}
if p1 < p2 {
@@ -474,7 +474,7 @@ func fetchLatestGitHubRelease() (string, error) {
if err != nil {
return "", err
}
defer resp.Body.Close()
defer func() { _ = resp.Body.Close() }()
if resp.StatusCode != http.StatusOK {
return "", fmt.Errorf("github api returned status %d", resp.StatusCode)