mirror of
https://github.com/nadoo/glider.git
synced 2026-11-19 07:09:42 +08:00
chore: update documents
This commit is contained in:
1 parent
1fd59a1677
commit
a8d4e8d7ca
4 files changed
+6
-9
No files matched your search
+3
-5
@@ -131,14 +131,12 @@ func (d *Direct) DialUDP(network, addr string) (net.PacketConn, net.Addr, error)
|
||||
|
||||
// IFaceIPs returns ip addresses according to the specified interface.
|
||||
func (d *Direct) IFaceIPs() (ips []net.IP) {
|
||||
ipnets, err := d.iface.Addrs()
|
||||
ipNets, err := d.iface.Addrs()
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
for _, ipnet := range ipnets {
|
||||
ips = append(ips, ipnet.(*net.IPNet).IP) //!ip.IsLinkLocalUnicast()
|
||||
for _, ipNet := range ipNets {
|
||||
ips = append(ips, ipNet.(*net.IPNet).IP) //!ip.IsLinkLocalUnicast()
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
Reference in new issue
Block a user