firstAddr returns the network address of the first entry in the given addressers or nil using the given addrFunc.
(addressers []A, af addrFunc[A])
| 511 | // firstAddr returns the network address of the first entry in the given |
| 512 | // addressers or nil using the given addrFunc. |
| 513 | func firstAddr[A any](addressers []A, af addrFunc[A]) (addr net.Addr) { |
| 514 | if len(addressers) == 0 { |
| 515 | return nil |
| 516 | } |
| 517 | |
| 518 | return af(addressers[0]) |
| 519 | } |
| 520 | |
| 521 | // Addr returns the first listen address for the specified proto or nil if the |
| 522 | // proxy does not listen to it. proto must be one of [Proto]: [ProtoTCP], |
no outgoing calls
no test coverage detected
searching dependent graphs…