summaryrefslogtreecommitdiff
path: root/stream.go
diff options
context:
space:
mode:
authorMJacred <loesch.benny92@gmx.de>2022-07-14 17:36:43 +0200
committerGitHub <noreply@github.com>2022-07-14 23:36:43 +0800
commit6429588e1448f70539774a88840f094829cb9e07 (patch)
treebe54a60658885cfb27d037f06af457dda5644c3a /stream.go
parente37724c22b95de974f0235e992236d555aa6ad12 (diff)
adjust `ErrColumnNumber`, rename `TotalColumns` to `MaxColumns` and add new constant `MinColumns` (#1272)
Signed-off-by: Benjamin Lösch <loesch.benny92@gmx.de>
Diffstat (limited to 'stream.go')
-rw-r--r--stream.go5
1 files changed, 1 insertions, 4 deletions
diff --git a/stream.go b/stream.go
index 641340e..0db2438 100644
--- a/stream.go
+++ b/stream.go
@@ -387,10 +387,7 @@ func (sw *StreamWriter) SetColWidth(min, max int, width float64) error {
if sw.sheetWritten {
return ErrStreamSetColWidth
}
- if min > TotalColumns || max > TotalColumns {
- return ErrColumnNumber
- }
- if min < 1 || max < 1 {
+ if min < MinColumns || min > MaxColumns || max < MinColumns || max > MaxColumns {
return ErrColumnNumber
}
if width > MaxColumnWidth {