summaryrefslogtreecommitdiff
path: root/file.go
diff options
context:
space:
mode:
authorxuri <xuri.me@gmail.com>2022-10-14 00:48:16 +0800
committerxuri <xuri.me@gmail.com>2022-10-14 00:48:16 +0800
commit3d02726ad4dc3bc6a92d5b68ef8421ac4db44076 (patch)
treeb6fe49d32bf14f7b85316073037122d24b19adf0 /file.go
parent7363c1e3337c5f0d9c70cc8af7504b3f8c092ab4 (diff)
This closes #320, support custom chart axis font style
Diffstat (limited to 'file.go')
-rw-r--r--file.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/file.go b/file.go
index c83d17e..7ce536c 100644
--- a/file.go
+++ b/file.go
@@ -72,7 +72,7 @@ func (f *File) SaveAs(name string, opts ...Options) error {
return ErrMaxFilePathLength
}
f.Path = name
- if _, ok := supportedContentType[filepath.Ext(f.Path)]; !ok {
+ if _, ok := supportedContentTypes[filepath.Ext(f.Path)]; !ok {
return ErrWorkbookFileFormat
}
file, err := os.OpenFile(filepath.Clean(name), os.O_WRONLY|os.O_TRUNC|os.O_CREATE, os.ModePerm)
@@ -112,7 +112,7 @@ func (f *File) WriteTo(w io.Writer, opts ...Options) (int64, error) {
f.options = &opts[i]
}
if len(f.Path) != 0 {
- contentType, ok := supportedContentType[filepath.Ext(f.Path)]
+ contentType, ok := supportedContentTypes[filepath.Ext(f.Path)]
if !ok {
return 0, ErrWorkbookFileFormat
}