parse --publish ports into spec

This commit is contained in:
Pavel Sviderski committed 2024-12-10 17:57:26 +10:00
1 parent deedbcb8a9
commit e8908ced9e
4 files changed
+25 -8

No files matched your search

+2 -1
View File
@@ -41,7 +41,8 @@ func (p *PortSpec) Validate() error {
switch p.Protocol {
case ProtocolHTTP, ProtocolHTTPS, ProtocolTCP, ProtocolUDP:
default:
return fmt.Errorf("invalid protocol: '%s'", p.Protocol)
return fmt.Errorf("invalid protocol '%s', supported protocols: '%s', '%s', '%s', '%s'",
p.Protocol, ProtocolHTTP, ProtocolHTTPS, ProtocolTCP, ProtocolUDP)
}
switch p.Mode {