Skip to content

Commit

Permalink
fix: lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaost committed Jul 18, 2024
1 parent 61de0b0 commit 7257865
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 1 addition & 3 deletions protocol/thrift/binary.go
Original file line number Diff line number Diff line change
Expand Up @@ -378,9 +378,7 @@ func (BinaryProtocol) ReadDouble(buf []byte) (v float64, l int, err error) {
return math.Float64frombits(binary.BigEndian.Uint64(buf)), 8, nil
}

var (
errDepthLimitExceeded = NewProtocolException(DEPTH_LIMIT, "depth limit exceeded")
)
var errDepthLimitExceeded = NewProtocolException(DEPTH_LIMIT, "depth limit exceeded")

var typeToSize = [256]int8{
BOOL: 1,
Expand Down
3 changes: 3 additions & 0 deletions protocol/thrift/binaryreader.go
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,9 @@ func (r *BinaryReader) skipType(t TType, maxdepth int) error {
case STRUCT:
for {
ft, _, err := r.ReadFieldBegin()
if err != nil {
return err
}
if ft == STOP {
return nil
}
Expand Down
1 change: 0 additions & 1 deletion protocol/thrift/binaryreader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,5 +257,4 @@ func TestBinaryReaderSkip(t *testing.T) {
err = r.Skip(TType(122))
require.Error(t, err)
}

}

0 comments on commit 7257865

Please sign in to comment.