- type PortSpec
PortSpec is the specification of a port or port range
func NewPortSpec ¶
NewPortSpec creates a new port spec
func NewPortSpecFromString ¶
NewPortSpecFromString creates a new port spec
func (*PortSpec) IsIncluded ¶
IsIncluded returns trues if a port is within the range of the portspec
func (*PortSpec) IsMultiPort ¶
IsMultiPort returns true if the spec is for multiple ports.
Overlaps returns true if the provided port spect overlaps with the given one.
Range returns the range of a spec.
func (*PortSpec) SinglePort ¶
SinglePort returns the port of a non multi-port spec
MultiPort returns the multi-port range as a string.