setRow sets the value of all the cells of the specified row from the specified map indexed by column id.
(row int, values map[string]interface{})
| 663 | // setRow sets the value of all the cells of the specified row from |
| 664 | // the specified map indexed by column id. |
| 665 | func (t *Table) setRow(row int, values map[string]interface{}) { |
| 666 | |
| 667 | for ci := 0; ci < len(t.header.cols); ci++ { |
| 668 | c := t.header.cols[ci] |
| 669 | cv, ok := values[c.id] |
| 670 | if !ok { |
| 671 | continue |
| 672 | } |
| 673 | t.setCell(row, c.id, cv) |
| 674 | } |
| 675 | } |
| 676 | |
| 677 | // setCell sets the value of the cell specified by its row and column id |
| 678 | func (t *Table) setCell(row int, colid string, value interface{}) { |