func NewPort(proto, port string) (Port, error) {
	// Check for parsing issues on "port" now so we can avoid having
	// to check it later on.

	portStartInt, portEndInt, err := ParsePortRange(port)
	if err != nil {
		return "", err
	}

	if portStartInt == portEndInt {
		return Port(fmt.Sprintf("%d/%s", portStartInt, proto)), nil
	}
	return Port(fmt.Sprintf("%d-%d/%s", portStartInt, portEndInt, proto)), nil
}
// NewPort creates a new instance of a Port given a protocol and port number or port range
NewPort creates a new instance of a Port given a protocol and port number or port range
// NewPort creates a new instance of a Port given a protocol and port number or port range
func NewPort(proto, port string) (Port, error) {
	portStartInt, portEndInt, err := ParsePortRange(port)
	if err != nil {
		return "", err
	}
	if portStartInt == portEndInt {
		return Port(fmt.Sprintf("%d/%s", portStartInt, proto)), nil
	}
	return Port(fmt.Sprintf("%d-%d/%s", portStartInt, portEndInt, proto)), nil
}
func NewPort ( proto , port string ) ( Port , error ) { portStartInt , portEndInt , err := ParsePortRange ( port ) if err != nil { return " " , err } if portStartInt == portEndInt { return Port ( fmt . Sprintf ( " " , portStartInt , proto ) ) , nil } return Port ( fmt . Sprintf ( " " , portStartInt , portEndInt , proto ) ) , nil }
NewPort creates a new instance of a Port given a protocol and port number or port range
NewPort creates a new instance of a Port given a protocol and port number or port range
// Check for parsing issues on "port" now so we can avoid having // to check it later on.