summaryrefslogtreecommitdiff
path: root/styles.go
diff options
context:
space:
mode:
authorxuri <xuri.me@gmail.com>2021-07-05 00:03:56 +0800
committerxuri <xuri.me@gmail.com>2021-07-05 00:03:56 +0800
commit544ef18a8cb9949fcb8833c6d2816783c90f3318 (patch)
tree88bb3eaa9d92522d3b5c4eeb052210c26bc4c99f /styles.go
parent0e02329bedf6648259fd219642bb907bdb07fd21 (diff)
- Support concurrency iterate rows and columns
- Rename exported field `File.XLSX` to `File.Pkg` - Exported error message
Diffstat (limited to 'styles.go')
-rw-r--r--styles.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/styles.go b/styles.go
index 1ba9f08..235746c 100644
--- a/styles.go
+++ b/styles.go
@@ -15,7 +15,6 @@ import (
"bytes"
"encoding/json"
"encoding/xml"
- "errors"
"fmt"
"io"
"log"
@@ -1104,14 +1103,14 @@ func parseFormatStyleSet(style interface{}) (*Style, error) {
case *Style:
fs = *v
default:
- err = errors.New("invalid parameter type")
+ err = ErrParameterInvalid
}
if fs.Font != nil {
if len(fs.Font.Family) > MaxFontFamilyLength {
- return &fs, errors.New("the length of the font family name must be smaller than or equal to 31")
+ return &fs, ErrFontLength
}
if fs.Font.Size > MaxFontSize {
- return &fs, errors.New("font size must be between 1 and 409 points")
+ return &fs, ErrFontSize
}
}
return &fs, err