net

package
v0.0.0-...-43038e4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 8, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsPortInRange

func IsPortInRange(port, endPort, targetPort int) bool

IsPortInRange checks if targetPort is between port and endPort (inclusive). If endPort is zero, it checks if targetPort equals port. It assumes that the provided port range is valid (see ValidatePortRange).

func ValidatePortRange

func ValidatePortRange(port, endPort int) error

ValidatePortRange checks if the given port range is within bounds. If endPort is not zero, it also checks if it's bigger than port. A port range with zero as endPort is assumed to describe a single port.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL