Skip to content

client: Client.postHijacked: use Client.buildRequest#45979

Merged
thaJeztah merged 2 commits intomoby:masterfrom
thaJeztah:hijack_share_request_builder
Jul 17, 2023
Merged

client: Client.postHijacked: use Client.buildRequest#45979
thaJeztah merged 2 commits intomoby:masterfrom
thaJeztah:hijack_share_request_builder

Conversation

@thaJeztah
Copy link
Copy Markdown
Member

Use Client.buildRequest instead of a local copy of the same logic so that we're using the same logic, and there's less chance of diverging.

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

Just making my IDE and some linters slightly happier.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Use Client.buildRequest instead of a local copy of the same logic so
that we're using the same logic, and there's less chance of diverging.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah added area/api API status/2-code-review kind/refactor PR's that refactor, or clean-up code labels Jul 15, 2023
@thaJeztah thaJeztah marked this pull request as ready for review July 16, 2023 08:54
@thaJeztah thaJeztah requested a review from corhere July 16, 2023 10:37
}
if resp.StatusCode != http.StatusSwitchingProtocols {
resp.Body.Close()
_ = resp.Body.Close()
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It feels like if we're going to adopt the explicit discarded return paradigm, we should consider re-enabling the relevant linters, so we don't "regress" in the affected files again...

@thaJeztah thaJeztah merged commit 7799f23 into moby:master Jul 17, 2023
@thaJeztah thaJeztah deleted the hijack_share_request_builder branch July 17, 2023 21:50
@thaJeztah thaJeztah added this to the 25.0.0 milestone Jul 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/api API kind/refactor PR's that refactor, or clean-up code status/2-code-review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants