From 39704080b626e67ae979bb91e19f14f6e8d3e31a Mon Sep 17 00:00:00 2001 From: "yangrui.emma" Date: Fri, 16 Aug 2024 01:51:37 +0800 Subject: [PATCH] refactor: remove the TTransport in apache bridge module --- protocol/thrift/apache/apache_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/protocol/thrift/apache/apache_test.go b/protocol/thrift/apache/apache_test.go index 64e3fd6..bcbf85e 100644 --- a/protocol/thrift/apache/apache_test.go +++ b/protocol/thrift/apache/apache_test.go @@ -38,7 +38,7 @@ func TestThriftReadWrite(t *testing.T) { buf := &bytes.Buffer{} - err = ThriftWrite(NewBufferTransport(buf), v) + err = ThriftWrite(buf, v) require.Same(t, err, errThriftWriteNotRegistered) RegisterThriftWrite(callThriftWrite) @@ -84,18 +84,18 @@ func checkTStruct(v interface{}) error { return nil } -func callThriftRead(t TTransport, v interface{}) error { +func callThriftRead(rw io.ReadWriter, v interface{}) error { p, ok := v.(TStruct) if !ok { return errNotThriftTStruct } - return p.Read(t) + return p.Read(rw) } -func callThriftWrite(t TTransport, v interface{}) error { +func callThriftWrite(rw io.ReadWriter, v interface{}) error { p, ok := v.(TStruct) if !ok { return errNotThriftTStruct } - return p.Write(t) + return p.Write(rw) }