diff options
author | xuri <xuri.me@gmail.com> | 2019-08-19 16:52:14 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-19 16:52:14 +0800 |
commit | da99334fca412c33e9e077703e7373b0899e8a87 (patch) | |
tree | 05f901fcf47d041ea33bc8fa25f71f34bce4d113 | |
parent | 3092ce6e542bec39135844c4bf45fe22f9e30b7a (diff) | |
parent | 64809db2c9ee30779e4839e9d60a315479092ce6 (diff) |
Merge pull request #475 from mqy/master
add missing error check in SetSheetRow()
-rw-r--r-- | cell.go | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -471,12 +471,14 @@ func (f *File) SetSheetRow(sheet, axis string, slice interface{}) error { for i := 0; i < v.Len(); i++ { cell, err := CoordinatesToCellName(col+i, row) - // Error should never happens here. But keep ckecking to early detect regresions - // if it will be introduced in furure + // Error should never happens here. But keep checking to early detect regresions + // if it will be introduced in future. if err != nil { return err } - f.SetCellValue(sheet, cell, v.Index(i).Interface()) + if err := f.SetCellValue(sheet, cell, v.Index(i).Interface()); err != nil { + return err + } } return err } |