From 74f6ea94eae45c8fb89a23cc94802e57ce279a84 Mon Sep 17 00:00:00 2001 From: xuri Date: Wed, 19 Jan 2022 00:51:09 +0800 Subject: ref #1054, breaking change for the column and row's iterator This removed 3 exported functions: `TotalCols`, `CurrentCol` and `CurrentRow` --- cell_test.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'cell_test.go') diff --git a/cell_test.go b/cell_test.go index b3bb997..8d00e2d 100644 --- a/cell_test.go +++ b/cell_test.go @@ -682,8 +682,10 @@ func TestSharedStringsError(t *testing.T) { rows, err := f.Rows("Sheet1") assert.NoError(t, err) const maxUint16 = 1<<16 - 1 + currentRow := 0 for rows.Next() { - if rows.CurrentRow() == 19 { + currentRow++ + if currentRow == 19 { _, err := rows.Columns() assert.NoError(t, err) // Test get cell value from string item with invalid offset @@ -705,8 +707,10 @@ func TestSharedStringsError(t *testing.T) { assert.NoError(t, err) rows, err = f.Rows("Sheet1") assert.NoError(t, err) + currentRow = 0 for rows.Next() { - if rows.CurrentRow() == 19 { + currentRow++ + if currentRow == 19 { _, err := rows.Columns() assert.NoError(t, err) break -- cgit v1.2.1