diff options
author | MJacred <loesch.benny92@gmx.de> | 2022-07-14 17:36:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-14 23:36:43 +0800 |
commit | 6429588e1448f70539774a88840f094829cb9e07 (patch) | |
tree | be54a60658885cfb27d037f06af457dda5644c3a /stream.go | |
parent | e37724c22b95de974f0235e992236d555aa6ad12 (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.go | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -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 { |