diff options
author | xuri <xuri.me@gmail.com> | 2020-09-18 22:20:58 +0800 |
---|---|---|
committer | xuri <xuri.me@gmail.com> | 2020-09-18 22:20:58 +0800 |
commit | 324f87bcaed9ec775c0b79627956a093ad481d36 (patch) | |
tree | 56a779bde041b3dae82ab0f2e827ed0021c3d602 /file.go | |
parent | 96917e4617c9e7eb15c0ee1723a042f169321430 (diff) |
add checking and limits for the worksheet
Diffstat (limited to 'file.go')
-rw-r--r-- | file.go | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -65,7 +65,7 @@ func (f *File) Save() error { // SaveAs provides a function to create or update to an xlsx file at the // provided path. func (f *File) SaveAs(name string, opt ...Options) error { - if len(name) > FileNameLength { + if len(name) > MaxFileNameLength { return errors.New("file name length exceeds maximum limit") } file, err := os.OpenFile(name, os.O_WRONLY|os.O_TRUNC|os.O_CREATE, 0666) |