Skip to content

Commit

Permalink
style: data/table: change param capitalization
Browse files Browse the repository at this point in the history
  • Loading branch information
grokify committed Jun 13, 2022
1 parent d250706 commit 036bd9b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
4 changes: 2 additions & 2 deletions data/table/read.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ func (opts *ParseOptions) HasFilter() bool {
return false
}

func (opts *ParseOptions) Filter(cols []string, rows [][]string, errorOutofBounds bool) ([][]string, error) {
func (opts *ParseOptions) Filter(cols []string, rows [][]string, errorOutOfBounds bool) ([][]string, error) {
newRows := [][]string{}
indices := opts.FilterColIndices

Expand Down Expand Up @@ -217,7 +217,7 @@ func (opts *ParseOptions) Filter(cols []string, rows [][]string, errorOutofBound
for _, idx := range indices {
if int(idx) <= len(row) {
newRow = append(newRow, row[int(idx)])
} else if errorOutofBounds {
} else if errorOutOfBounds {
return newRows, fmt.Errorf("desired index out of bounds: index[%d] row len [%d]", idx, len(row))
} else {
newRow = append(newRow, "")
Expand Down
21 changes: 21 additions & 0 deletions data/table/xcelize/borders.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package xcelize

/*
https://pkg.go.dev/github.com/xuri/excelize/v2#File.NewStyle
Index | Name | Weight | Style
-------+---------------+--------+-------------
0 | None | 0 |
1 | Continuous | 1 | -----------
2 | Continuous | 2 | -----------
3 | Dash | 1 | - - - - - -
4 | Dot | 1 | . . . . . .
5 | Continuous | 3 | -----------
6 | Double | 3 | ===========
7 | Continuous | 0 | -----------
8 | Dash | 2 | - - - - - -
9 | Dash Dot | 1 | - . - . - .
10 | Dash Dot | 2 | - . - . - .
11 | Dash Dot Dot | 1 | - . . - . .
12 | Dash Dot Dot | 2 | - . . - . .
13 | SlantDash Dot | 2 | / - . / - .
*/

0 comments on commit 036bd9b

Please sign in to comment.