derailed 2020-07-03 09:13:04 -06:00
parent 4c5d1c0218
commit 5b1c429350
1 changed files with 4 additions and 4 deletions

View File

@ -51,7 +51,7 @@ func ShowPortForwards(v ResourceViewer, path string, ports []string, okFn PortFo
for _, p := range pp1 { for _, p := range pp1 {
if !hasPort(p, ports) { if !hasPort(p, ports) {
v.App().Flash().Err(fmt.Errorf("container port must match exposed ports")) v.App().Flash().Err(fmt.Errorf("container port %q must match exposed ports %v", p, pp1))
return return
} }
} }
@ -92,12 +92,12 @@ func DismissPortForwards(v ResourceViewer, p *ui.Pages) {
func hasPort(port string, pp []string) bool { func hasPort(port string, pp []string) bool {
for _, p := range pp { for _, p := range pp {
if p != port { if p == port {
return false return true
} }
} }
return true return false
} }
func extractPort(p string) string { func extractPort(p string) string {