testport

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package testport reserves ephemeral TCP ports for tests that must choose one up front. `mache serve` rejects a bare ":0" and never reports the port it actually bound, so callers (installverify's client harness, the launchd lifecycle E2E) have to pick before launching. One definition, because two copies of this helper is exactly the duplication the smell gate flags.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Free

func Free(t testing.TB) int

Free reserves a port by binding and immediately releasing it. The window between release and re-bind is a theoretical race, not a practical one on a test host.

Types

This section is empty.

Jump to

Keyboard shortcuts

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