Remove duplicate TLS declarations in internal/httputil#7887
Merged
Conversation
Copilot
AI
changed the title
[WIP] Fix duplicate TLS declarations in internal/httputil package
Remove duplicate TLS declarations in Jun 21, 2026
internal/httputil
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes internal/httputil build failures caused by duplicate TLS helper and test declarations by consolidating the package back to a single implementation (tls.go) and a single test file (tls_test.go).
Changes:
- Remove the duplicate TLS helper implementation by deleting
internal/httputil/tls_config.go. - Remove the duplicate TLS tests by deleting
internal/httputil/tls_config_test.go. - Preserve the only distinct assertion from the duplicate tests by adding
assert.NotNilchecks tointernal/httputil/tls_test.go.
Show a summary per file
| File | Description |
|---|---|
| internal/httputil/tls_test.go | Adds missing assert.NotNil coverage for the returned TLS configs to retain the unique assertion from the deleted duplicate test file. |
| internal/httputil/tls_config.go | Deletes the redundant TLS helper definitions that caused package-level redeclaration errors. |
| internal/httputil/tls_config_test.go | Deletes the redundant TLS test file to eliminate duplicate test symbol definitions. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 3/3 changed files
- Comments generated: 0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
internal/httputilcontained two copies of the same TLS helpers and tests, causing package-level redeclaration errors and preventing the package from compiling. This change consolidates the package back to a single implementation and a single test file.Remove duplicate package declarations
internal/httputil/tls_config.gointernal/httputil/tls.goas the single source of truth for:MinTLSVersionNewServerTLSConfigNewClientTLSConfigCollapse duplicate tests
internal/httputil/tls_config_test.goassert.NotNilchecks tointernal/httputil/tls_test.goResulting package shape