code: func NewPortCommand(dockerCli command.Cli) *cobra.Command {
  	var opts portOptions
  
  	cmd := &cobra.Command{
  		Use:   "port CONTAINER [PRIVATE_PORT[/PROTO]]",
  		Short: "List port mappings or a specific mapping for the container",
  		Args:  cli.RequiresRangeArgs(1, 2),
  		RunE: func(cmd *cobra.Command, args []string) error {
  			opts.container = args[0]
  			if len(args) > 1 {
  				opts.port = args[1]
  			}
  			return runPort(dockerCli, &opts)
  		},
  	}
  	return cmd
  }
docs: // NewPortCommand creates a new cobra.Command for `docker port`