Skip to content

Commit

Permalink
Update function name to more accurately reflect requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
ashuntu committed Dec 6, 2024
1 parent 8ade7f0 commit bd7ec29
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func NewHostIPConfigMock(state MockIPAdaptersState) MockIPConfig {
}

// prefer not to listen on public interfaces if possible.
localIP := getLocalPrivateIP()
localIP := getLocalPrivateIPv4()
if localIP == nil {
localIP = net.IPv4(0, 0, 0, 0)
}
Expand Down Expand Up @@ -137,8 +137,8 @@ func fillBufferFromTemplate(adaptersAddresses *IPAdapterAddresses, sizePointer *
return nil
}

// getLocalPrivateIP returns one non loopback local private IP of the host.
func getLocalPrivateIP() net.IP {
// getLocalPrivateIPv4 returns one non loopback local private IPv4 of the host.
func getLocalPrivateIPv4() net.IP {
addrs, err := net.InterfaceAddrs()
if err != nil {
return nil
Expand Down

0 comments on commit bd7ec29

Please sign in to comment.