Files
gluetun/internal/cli/cli.go

17 lines
289 B
Go
Raw Normal View History

package cli
2020-02-08 21:50:17 +00:00
import (
"fmt"
2020-06-05 19:32:12 -04:00
"net"
2020-02-08 21:50:17 +00:00
)
func HealthCheck() error {
ips, err := net.LookupIP("github.com")
if err != nil {
return fmt.Errorf("cannot resolve github.com (%s)", err)
} else if len(ips) == 0 {
return fmt.Errorf("resolved no IP addresses for github.com")
2020-02-08 21:50:17 +00:00
}
return nil
}