package ping import ( "testing" ) func TestPing(t *testing.T) { ip := "192.168.1.229" port := 6379 portType := "TCP" key := "REDIS" tls := false ch := make(chan Res) Ping(ch, ip, port, tls, portType, key) for res := range ch { if res.Error != nil { t.Error(res.Error) } else { t.Log(res.Matcher.Name()) t.Log(res.Matcher.Meta()) } } }