diff options
author | xuri <xuri.me@gmail.com> | 2021-07-05 00:03:56 +0800 |
---|---|---|
committer | xuri <xuri.me@gmail.com> | 2021-07-05 00:03:56 +0800 |
commit | 544ef18a8cb9949fcb8833c6d2816783c90f3318 (patch) | |
tree | 88bb3eaa9d92522d3b5c4eeb052210c26bc4c99f /styles.go | |
parent | 0e02329bedf6648259fd219642bb907bdb07fd21 (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.go | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -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 |