@@ -83,13 +83,13 @@ func makeAligned64(data []byte) []byte {
8383
8484func TestGenerateMasks (t * testing.T ) {
8585 tests := []struct {
86- name string
87- input []byte
88- separator byte
89- wantQuotePos []int // expected bit positions for quotes
90- wantSepPos []int // expected bit positions for separators
91- wantCRPos []int // expected bit positions for CR
92- wantNLPos []int // expected bit positions for LF
86+ name string
87+ input []byte
88+ separator byte
89+ wantQuotePos []int // expected bit positions for quotes
90+ wantSepPos []int // expected bit positions for separators
91+ wantCRPos []int // expected bit positions for CR
92+ wantNLPos []int // expected bit positions for LF
9393 }{
9494 {
9595 name : "simple_csv_line" ,
@@ -279,14 +279,14 @@ func TestGenerateMasks(t *testing.T) {
279279
280280func TestGenerateMasksPadded (t * testing.T ) {
281281 tests := []struct {
282- name string
283- input []byte
284- separator byte
285- wantQuotePos []int
286- wantSepPos []int
287- wantCRPos []int
288- wantNLPos []int
289- wantValidBits int
282+ name string
283+ input []byte
284+ separator byte
285+ wantQuotePos []int
286+ wantSepPos []int
287+ wantCRPos []int
288+ wantNLPos []int
289+ wantValidBits int
290290 }{
291291 {
292292 name : "single_byte" ,
@@ -485,8 +485,8 @@ func TestCRLFNormalization(t *testing.T) {
485485 tests := []struct {
486486 name string
487487 input []byte
488- wantNewlinePos []int // positions in final newline mask (after normalization)
489- wantCRLFNormalized bool // true if CRLF was normalized
488+ wantNewlinePos []int // positions in final newline mask (after normalization)
489+ wantCRLFNormalized bool // true if CRLF was normalized
490490 description string
491491 }{
492492 {
@@ -586,19 +586,19 @@ func TestCRLFNormalization(t *testing.T) {
586586// CR at byte 63 of chunk N, LF at byte 0 of chunk N+1
587587func TestCRLFBoundary (t * testing.T ) {
588588 tests := []struct {
589- name string
590- chunk1 []byte // first 64-byte chunk (CR at end)
591- chunk2 []byte // second 64-byte chunk (LF at start)
592- wantChunk1NL []int // newline positions in chunk 1
593- wantChunk2NL []int // newline positions in chunk 2
594- description string
589+ name string
590+ chunk1 []byte // first 64-byte chunk (CR at end)
591+ chunk2 []byte // second 64-byte chunk (LF at start)
592+ wantChunk1NL []int // newline positions in chunk 1
593+ wantChunk2NL []int // newline positions in chunk 2
594+ description string
595595 }{
596596 {
597597 name : "boundary_crlf" ,
598598 chunk1 : append (make ([]byte , 63 ), '\r' ),
599599 chunk2 : append ([]byte {'\n' }, make ([]byte , 63 )... ),
600- wantChunk1NL : nil , // CR at 63 is part of CRLF, not counted here
601- wantChunk2NL : []int {0 }, // LF at 0 is the actual newline
600+ wantChunk1NL : nil , // CR at 63 is part of CRLF, not counted here
601+ wantChunk2NL : []int {0 }, // LF at 0 is the actual newline
602602 description : "CRLF split across chunk boundary" ,
603603 },
604604 {
@@ -711,8 +711,8 @@ func TestChunkBoundaryQuotes(t *testing.T) {
711711 name : "boundary_escaped_quote_inside_field" ,
712712 chunk1 : append (append ([]byte (`"content` ), make ([]byte , 55 )... ), '"' ),
713713 chunk2 : append ([]byte {'"' , 'm' , 'o' , 'r' , 'e' , '"' }, make ([]byte , 58 )... ),
714- chunk1Quoted : false , // starts outside
715- wantSkipNextQuote : true , // "" at boundary
714+ chunk1Quoted : false , // starts outside
715+ wantSkipNextQuote : true , // "" at boundary
716716 wantChunk2QuoteSkip : true ,
717717 description : `"content..." with "" escape at boundary` ,
718718 },
@@ -841,8 +841,8 @@ func TestScanBuffer(t *testing.T) {
841841 input []byte
842842 separator byte
843843 wantChunkCount int
844- wantPostProcChunks []int // chunks that need post-processing (have escaped quotes)
845- wantFinalQuoted bool // should we end in quoted state?
844+ wantPostProcChunks []int // chunks that need post-processing (have escaped quotes)
845+ wantFinalQuoted bool // should we end in quoted state?
846846 description string
847847 }{
848848 {
@@ -959,14 +959,14 @@ func TestScanBuffer(t *testing.T) {
959959// TestScanBuffer_MaskContent verifies the actual mask content
960960func TestScanBuffer_MaskContent (t * testing.T ) {
961961 tests := []struct {
962- name string
963- input []byte
964- separator byte
965- chunkIdx int
966- wantSepPos []int
967- wantNLPos []int
968- wantQuotePos []int
969- description string
962+ name string
963+ input []byte
964+ separator byte
965+ chunkIdx int
966+ wantSepPos []int
967+ wantNLPos []int
968+ wantQuotePos []int
969+ description string
970970 }{
971971 {
972972 name : "verify_separator_positions" ,
@@ -1034,8 +1034,8 @@ func TestScanBuffer_MultiChunk(t *testing.T) {
10341034 // Chunk 1: bytes 64-127
10351035 // Chunk 2: bytes 128+
10361036 chunk0 := strings .Repeat ("a," , 20 ) + "field\n " + strings .Repeat ("b," , 10 ) // ~66 bytes
1037- chunk1 := strings .Repeat ("c," , 25 ) + "data\n " // ~55 bytes
1038- chunk2 := "last\n " // 5 bytes
1037+ chunk1 := strings .Repeat ("c," , 25 ) + "data\n " // ~55 bytes
1038+ chunk2 := "last\n " // 5 bytes
10391039
10401040 input := []byte (chunk0 + chunk1 + chunk2 )
10411041
0 commit comments