CNF-24259: Consolidate duplicate normalizeHost functions#72
Conversation
Replace three identical host-normalization functions with a single exported stringutil.NormalizeHost to eliminate code duplication.
|
@sebrandon1: This pull request references CNF-24259 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: sebrandon1 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@sebrandon1: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Summary
stringutil.NormalizeHost()Jira: CNF-24259
Functions removed
normalizeHost()cmd/tls-scanner/main.gonormalizeTargetHost()internal/scanner/scanner.gonormalizeTemplateHost()internal/scanner/template.goReplaced with
stringutil.NormalizeHost()ininternal/stringutil/stringutil.goTest plan
go build ./...passesgo test ./...passesmake lintpassesTestNormalizeHostcovers 9 input variants