package mysql import ( "net" "testing" csm "git.loafle.net/commons/service_matcher-go" ) func TestMySql(t *testing.T) { m := NewMatcher() conn, _ := net.Dial("tcp", "192.168.1.201:23306") defer conn.Close() bytes := make([]byte, 1024) n, _ := conn.Read(bytes) p := csm.NewPacket(bytes, n) if err := m.Match(nil, 0, p); err != nil { t.Error(err) } t.Log(m.Name()) t.Log(m.Meta()) }