feat: add the ability to specify the output format when listing ports

This commit is contained in:
Jose Diaz-Gonzalez
2024-01-17 18:03:36 -05:00
parent 44054ac993
commit 78d24ead09
4 changed files with 26 additions and 6 deletions

View File

@@ -6,9 +6,9 @@ import (
// PortMap is a struct that contains a scheme:host-port:container-port mapping
type PortMap struct {
ContainerPort int
HostPort int
Scheme string
ContainerPort int `json:"container_port"`
HostPort int `json:"host_port"`
Scheme string `json:"scheme"`
}
func (p PortMap) String() string {