Skip to content

Conversation

@thaJeztah
Copy link
Member

sockets: configureUnixTransport, configureNpipeTransport: remove proto arg

These utilities are created for a specific proto ("unix", or "npipe"),
so the protocol should not be passed as an arguments as it cannot be
overridden.

sockets: InmemSocket: use dummyAddr as field-type

  • Move the dummyAddr type definition and methods together.
  • Change the InmemSocket.address field to a dummyAddr; the field is
    un-exported and could only be set through the constructor, so we
    can convert it when doing so.

- Description for the changelog

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

…o arg

These utilities are created for a specific proto ("unix", or "npipe"),
so the protocol should not be passed as an arguments as it cannot be
overridden.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
import "net/http"

func configureNpipeTransport(tr *http.Transport, proto, addr string) error {
func configureNpipeTransport(any, string) error {
Copy link
Member Author

Choose a reason for hiding this comment

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

used any here, as it's only a stub to produce an error.

@thaJeztah
Copy link
Member Author

Dusting-off some changes I still had stashed locally 😅

- Move the dummyAddr type definition and methods together.
- Change the InmemSocket.address field to a dummyAddr; the field is
  un-exported and could only be set through the constructor, so we
  can convert it when doing so.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Copy link
Contributor

@austinvazquez austinvazquez left a comment

Choose a reason for hiding this comment

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

LGTM

@austinvazquez austinvazquez merged commit 210a62a into docker:main Aug 11, 2025
13 checks passed
@thaJeztah thaJeztah deleted the sockets_cleanups branch August 11, 2025 12:14
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