cli/command/container: runPort(): update godoc, and add todo

We should consider showing all mappings for a given port if no specific
proto was specified.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2022-12-01 10:20:57 +01:00
parent 79dca7a38e
commit f0435fd3f3
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
1 changed files with 6 additions and 0 deletions

View File

@ -43,6 +43,12 @@ func NewPortCommand(dockerCli command.Cli) *cobra.Command {
return cmd return cmd
} }
// runPort shows the port mapping for a given container. Optionally, it
// allows showing the mapping for a specific (container)port and proto.
//
// TODO(thaJeztah): currently this defaults to show the TCP port if no
// proto is specified. We should consider changing this to "any" protocol
// for the given private port.
func runPort(dockerCli command.Cli, opts *portOptions) error { func runPort(dockerCli command.Cli, opts *portOptions) error {
ctx := context.Background() ctx := context.Background()