MCPcopy
hub / github.com/apache/devlake / CheckDNS

Function CheckDNS

backend/core/utils/network_helper.go:28–37  ·  view source on GitHub ↗

CheckDNS FIXME ...

(domain string)

Source from the content-addressed store, hash-verified

26
27// CheckDNS FIXME ...
28func CheckDNS(domain string) errors.Error {
29 ips, err := net.LookupIP(domain)
30 if err != nil {
31 return errors.Convert(err)
32 }
33 if len(ips) > 0 {
34 return nil
35 }
36 return errors.Default.New(fmt.Sprintf("failed to resolve host: %s", domain))
37}
38
39// CheckNetwork FIXME ...
40func CheckNetwork(host, port string, timeout time.Duration) errors.Error {

Callers 1

TestCheckDNSFunction · 0.85

Calls 2

NewMethod · 0.65
ConvertMethod · 0.45

Tested by 1

TestCheckDNSFunction · 0.68