mirror of
https://github.com/luscis/openlan.git
synced 2025-12-24 11:10:54 +08:00
11 lines
160 B
Go
11 lines
160 B
Go
package network
|
|
|
|
import "net"
|
|
|
|
func LookupIP(name string) string {
|
|
if addr, _ := net.LookupIP(name); len(addr) > 0 {
|
|
return addr[0].String()
|
|
}
|
|
return ""
|
|
}
|