From 2df615fa2831bd578371d4e3606f16461c474ce7 Mon Sep 17 00:00:00 2001
From: xuri <xuri.me@gmail.com>
Date: Thu, 20 Oct 2022 00:02:30 +0800
Subject: This close #1373, fixes the incorrect build-in number format apply
 the result

- An error will be returned when setting the stream row without ascending row numbers, to avoid potential mistakes as mentioned in #1139
- Updated unit tests
---
 errors.go | 6 ++++++
 1 file changed, 6 insertions(+)

(limited to 'errors.go')

diff --git a/errors.go b/errors.go
index fd896a6..6a23a2e 100644
--- a/errors.go
+++ b/errors.go
@@ -87,6 +87,12 @@ func newDecodeXMLError(err error) error {
 	return fmt.Errorf("xml decode error: %s", err)
 }
 
+// newStreamSetRowError defined the error message on the stream writer
+// receiving the non-ascending row number.
+func newStreamSetRowError(row int) error {
+	return fmt.Errorf("row %d has already been written", row)
+}
+
 var (
 	// ErrStreamSetColWidth defined the error message on set column width in
 	// stream writing mode.
-- 
cgit v1.2.1