SetColumns Explicityly set column names.
(cols []string)
| 548 | |
| 549 | // SetColumns Explicityly set column names. |
| 550 | func (m *Table) SetColumns(cols []string) { |
| 551 | m.FieldPositions = make(map[string]int, len(cols)) |
| 552 | for idx, col := range cols { |
| 553 | //col = strings.ToLower(col) |
| 554 | m.FieldPositions[col] = idx |
| 555 | cols[idx] = col |
| 556 | } |
| 557 | m.cols = cols |
| 558 | } |
| 559 | |
| 560 | // SetColumnsFromFields Explicityly set column names from fields. |
| 561 | func (m *Table) SetColumnsFromFields() { |
no outgoing calls
no test coverage detected