mirror of
https://github.com/injoyai/tdx.git
synced 2025-11-26 21:25:35 +08:00
20 lines
277 B
Go
20 lines
277 B
Go
package common
|
|
|
|
import (
|
|
"github.com/injoyai/logs"
|
|
"github.com/injoyai/tdx"
|
|
)
|
|
|
|
func Test(f func(c *tdx.Client)) {
|
|
for _, v := range tdx.Hosts {
|
|
c, err := tdx.Dial(v, tdx.WithDebug())
|
|
if err != nil {
|
|
logs.PrintErr(err)
|
|
continue
|
|
}
|
|
f(c)
|
|
<-c.Done()
|
|
break
|
|
}
|
|
}
|