Skip to content

Conversation

aknuds1
Copy link
Contributor

@aknuds1 aknuds1 commented Aug 26, 2025

Enable usestdlibvars linter and fix issues.

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
@aknuds1 aknuds1 requested a review from Copilot August 26, 2025 16:44
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enables the usestdlibvars linter in the Go configuration and fixes all violations by replacing hardcoded HTTP method strings with the corresponding standard library constants.

  • Enabled the usestdlibvars linter in the golangci-lint configuration
  • Replaced hardcoded "GET" strings with http.MethodGet constant across test files
  • Updated HTTP request creation calls to use standard library constants instead of string literals

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
.golangci.yml Uncommented the usestdlibvars linter to enable it
server/static_file_server_test.go Replaced hardcoded "GET" with http.MethodGet in test request creation
route/route_test.go Updated multiple test functions to use http.MethodGet instead of "GET" string
config/http_config_test.go Replaced "GET" strings with http.MethodGet constant in HTTP request tests

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@aknuds1 aknuds1 requested review from bwplotka and ywwg August 26, 2025 16:48
@aknuds1 aknuds1 merged commit b775ce4 into main Aug 26, 2025
9 checks passed
@aknuds1 aknuds1 deleted the arve/usestdlibvars branch August 26, 2025 17:47
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.

2 participants