open-consul/sdk/freeport/ephemeral_fallback.go
Pierre Souchay 6cb2bccca6
Proper detection of ephemeral ports on Mac OS (#7539)
Use systemctl to properly detect ephemeral ports on Mac OS (aka darwin) by fetching
systemctl values:
 * net.inet.ip.portrange.first
 * net.inet.ip.portrange.last

This will avoid the message:

`[INFO] freeport: ephemeral port range detection not configured for GOOS="darwin"`

and properly detect the correct port range
2020-03-30 09:13:03 -04:00

8 lines
112 B
Go

//+build !linux,!darwin
package freeport
func getEphemeralPortRange() (int, int, error) {
return 0, 0, nil
}