Skip to content

api/types/container: rename Port to PortSummary#50711

Merged
austinvazquez merged 1 commit intomoby:masterfrom
thaJeztah:rename_port
Aug 13, 2025
Merged

api/types/container: rename Port to PortSummary#50711
austinvazquez merged 1 commit intomoby:masterfrom
thaJeztah:rename_port

Conversation

@thaJeztah
Copy link
Member

@thaJeztah thaJeztah commented Aug 13, 2025

It better describes its purpose, and allows "Port" to be used for other purposes (e.g. to replace "nat.Port").

- What I did

- How I did it

- How to verify it

- Human readable description for the release notes

Go SDK: api/types/container: rename `Port` to `PortSummary`.

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

@thaJeztah thaJeztah added this to the 29.0.0 milestone Aug 13, 2025
@thaJeztah thaJeztah added the area/api API label Aug 13, 2025
@thaJeztah thaJeztah requested a review from tianon as a code owner August 13, 2025 10:58
@thaJeztah thaJeztah added status/2-code-review impact/changelog area/go-sdk impact/go-sdk Noteworthy (compatibility changes) in the Go SDK labels Aug 13, 2025
SandboxID string // SandboxID uniquely represents a container's network stack
SandboxKey string // SandboxKey identifies the sandbox
Ports PortMap // Ports is a collection of PortBinding indexed by Port
Ports PortMap // Ports is a collection of PortBinding indexed by "port/proto" see [PortProto]
Copy link
Member Author

Choose a reason for hiding this comment

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

Let me revert this as it's not directly related.


definitions:
Port:
PortMapping:
Copy link
Member

Choose a reason for hiding this comment

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

PortMapping sounds like a generic type that could be used to represent port mappings in many places. However, it's only used by ContainerSummary, and it's quite different from other types used for representing port bindings. So, maybe PortMappingSummary?

Copy link
Member Author

Choose a reason for hiding this comment

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

@akerouanton perhaps PortSummary would that work? (as it's for the Port field) - slightly shorter.

@austinvazquez austinvazquez changed the title api/types/container: rename Port to PortMapping api/types/container: rename Port to PortSummary Aug 13, 2025
It better describes its purpose, and allows "Port" to be used for
other purposes (e.g. to replace "nat.Port").

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Co-authored-by: Austin Vazquez <austin.vazquez@docker.com>
@austinvazquez austinvazquez merged commit 98286b9 into moby:master Aug 13, 2025
356 of 362 checks passed
@thaJeztah thaJeztah deleted the rename_port branch August 13, 2025 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants