diff options
author | xuri <xuri.me@gmail.com> | 2021-12-07 00:26:53 +0800 |
---|---|---|
committer | xuri <xuri.me@gmail.com> | 2021-12-07 00:26:53 +0800 |
commit | 44a13aa402b0189b119635d2f0a26961795c6bda (patch) | |
tree | 0000ed94fe92507517281812ba49d85aa58a7211 /file.go | |
parent | 3325c3946d0ab77083555bab334381a1167ee580 (diff) |
Export 7 errors so users can act differently on different type of errors
Diffstat (limited to 'file.go')
-rw-r--r-- | file.go | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -14,7 +14,6 @@ package excelize import ( "archive/zip" "bytes" - "fmt" "io" "os" "path/filepath" @@ -58,7 +57,7 @@ func NewFile() *File { // Save provides a function to override the spreadsheet with origin path. func (f *File) Save() error { if f.Path == "" { - return fmt.Errorf("no path defined for file, consider File.WriteTo or File.Write") + return ErrSave } return f.SaveAs(f.Path) } |