func ConvertToSinglePort(port string) (int64, error) {

	p, err := strconv.ParseInt(port, 10, 64)
	if err != nil {
		return -1, fmt.Errorf("%s is not a valid port", port)
	}

	if p < 1 || p > 65535 {
		return -1, fmt.Errorf("%s is not in between 1 and 65535", port)
	}

	return p, nil
}
// ConvertToSinglePort converts a string to port.
ConvertToSinglePort converts a string to port.
// ConvertToSinglePort converts a string to port .
func ConvertToSinglePort(port string) (int64, error) {
	p, err := strconv.ParseInt(port, 10, 64)
	if err != nil {
		return -1, fmt.Errorf("%s is not a valid port", port)
	}
	if p < 1 || p > 65535 {
		return -1, fmt.Errorf("%s is not in between 1 and 65535", port)
	}
	return p, nil
}
func ConvertToSinglePort ( port string ) ( int64 , error ) { p , err := strconv . ParseInt ( port , 10 , 64 ) if err != nil { return - 1 , fmt . Errorf ( " " , port ) } if p < 1 || p > 65535 { return - 1 , fmt . Errorf ( " " , port ) } return p , nil }
ConvertToSinglePort converts a string to port.
ConvertToSinglePort converts a string to port .