From 1c2f1c91910618cf377621da986779e38006272b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E7=BA=AF=E5=87=80?= <1113655791@qq.com> Date: Sat, 30 Nov 2024 19:44:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E6=9C=8D=E5=8A=A1=E5=99=A8?= =?UTF-8?q?=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- example/CheckHosts/main.go | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 example/CheckHosts/main.go diff --git a/example/CheckHosts/main.go b/example/CheckHosts/main.go new file mode 100644 index 0000000..e4cd657 --- /dev/null +++ b/example/CheckHosts/main.go @@ -0,0 +1,22 @@ +package main + +import ( + "github.com/injoyai/logs" + "github.com/injoyai/tdx" +) + +func main() { + + for _, v := range tdx.Hosts { + + c, err := tdx.Dial(v) + if err != nil { + logs.Errf("[%s:7709] %v", v, err) + continue + } + c.Close() + logs.Debugf("[%s:7709] 连ζŽ₯成功...\n", v) + + } + +}