ax(mining): replace prose comment with usage example on findAvailablePort

AX Principle 2 — comments must show HOW with real values, not restate
what the function name already says.

Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
Claude 2026-04-02 09:11:24 +01:00
parent 8e9f18ac3e
commit 301a5428b0
No known key found for this signature in database
GPG key ID: AF404715446AEB41

View file

@ -213,7 +213,9 @@ func (m *Manager) autostartMiners() {
}
}
// findAvailablePort finds an available TCP port on the local machine.
// port, err := findAvailablePort()
// if err != nil { return 0, err }
// config.HTTPPort = port
func findAvailablePort() (int, error) {
addr, err := net.ResolveTCPAddr("tcp", "localhost:0")
if err != nil {