Skip to content

Fix pre-existing lint warnings#593

Merged
camathieu merged 1 commit intomasterfrom
fix/lint-warnings
Feb 16, 2026
Merged

Fix pre-existing lint warnings#593
camathieu merged 1 commit intomasterfrom
fix/lint-warnings

Conversation

@camathieu
Copy link
Member

Fix two pre-existing lint warnings flagged by gopls / staticcheck:

Changes

  • server/handlers/ovh.go:44 — Remove redundant nil check before len() (staticcheck S1009). len() on a nil slice is defined as zero in Go, so if body != nil && len(body) > 0 is simplified to if len(body) > 0.

  • server/handlers/get_file_test.go:50 — Remove no-op req.URL.Query().Set("dl", "true") (SA4027). (*net/url.URL).Query() returns a copy — calling .Set() on that copy has no effect on the URL. The ?dl=true parameter is already set in the URL string literal.

Closes #588

- ovh.go: remove redundant nil check before len() (staticcheck S1009)
- get_file_test.go: remove no-op Query().Set() on copy (SA4027)

Closes #588
@camathieu camathieu merged commit 4dd8420 into master Feb 16, 2026
4 checks passed
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.

Fix lint warnings

1 participant