diff options
author | xuri <xuri.me@gmail.com> | 2022-09-11 00:04:04 +0800 |
---|---|---|
committer | xuri <xuri.me@gmail.com> | 2022-09-11 00:04:04 +0800 |
commit | b6cc43d8242fd3f7f0c6163db9fcd759b9b992b1 (patch) | |
tree | 3bf1b4b6d37f006ced435931a8aad10d2e652a24 /styles.go | |
parent | c72fb747b8a64117538229f1e5a85d220349b6f1 (diff) |
This makes 6 functions concurrency safety
- These 6 functions now support concurrency safe: SetColWidth, GetColWidth, SetColVisible, GetColVisible, SetColStyle and GetColStyle
Diffstat (limited to 'styles.go')
-rw-r--r-- | styles.go | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -1005,8 +1005,9 @@ func parseFormatStyleSet(style interface{}) (*Style, error) { return &fs, err } -// NewStyle provides a function to create the style for cells by given JSON or -// structure pointer. Note that the color field uses RGB color code. +// NewStyle provides a function to create the style for cells by given +// structure pointer or JSON. This function is concurrency safe. Note that the +// color field uses RGB color code. // // The following shows the border styles sorted by excelize index number: // @@ -2493,10 +2494,10 @@ func (f *File) GetCellStyle(sheet, axis string) (int, error) { } // SetCellStyle provides a function to add style attribute for cells by given -// worksheet name, coordinate area and style ID. Note that diagonalDown and -// diagonalUp type border should be use same color in the same coordinate -// area. SetCellStyle will overwrite the existing styles for the cell, it -// won't append or merge style with existing styles. +// worksheet name, coordinate area and style ID. This function is concurrency +// safe. Note that diagonalDown and diagonalUp type border should be use same +// color in the same coordinate area. SetCellStyle will overwrite the existing +// styles for the cell, it won't append or merge style with existing styles. // // For example create a borders of cell H9 on Sheet1: // |