From 544ef18a8cb9949fcb8833c6d2816783c90f3318 Mon Sep 17 00:00:00 2001 From: xuri Date: Mon, 5 Jul 2021 00:03:56 +0800 Subject: - Support concurrency iterate rows and columns - Rename exported field `File.XLSX` to `File.Pkg` - Exported error message --- styles.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'styles.go') 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 -- cgit v1.2.1