parseTableOptions provides a function to parse the format settings of the table with default value.
(opts *Table)
| 31 | // parseTableOptions provides a function to parse the format settings of the |
| 32 | // table with default value. |
| 33 | func parseTableOptions(opts *Table) (*Table, error) { |
| 34 | var err error |
| 35 | if opts == nil { |
| 36 | return &Table{ShowRowStripes: boolPtr(true)}, err |
| 37 | } |
| 38 | if opts.ShowRowStripes == nil { |
| 39 | opts.ShowRowStripes = boolPtr(true) |
| 40 | } |
| 41 | if err = checkDefinedName(opts.Name); err != nil { |
| 42 | return opts, err |
| 43 | } |
| 44 | return opts, err |
| 45 | } |
| 46 | |
| 47 | // AddTable provides the method to add table in a worksheet by given worksheet |
| 48 | // name, range reference and format set. For example, create a table of A1:D5 |
no test coverage detected