(subTable *table)
| 406 | } |
| 407 | |
| 408 | func (t *table) addSection(subTable *table) { |
| 409 | if subTable.buf.Len() > 0 { |
| 410 | if t.buf.Len() == 0 { |
| 411 | // Add the section title: |
| 412 | if subTable.sectionHeader != "" { |
| 413 | t.formatSectionHeader(subTable.sectionHeader) |
| 414 | } |
| 415 | } else if t.indent == -1 { |
| 416 | // The top-level section gets blank lines between its |
| 417 | // subsections: |
| 418 | t.emitBlankRow() |
| 419 | } |
| 420 | fmt.Fprint(&t.buf, subTable.buf.String()) |
| 421 | } |
| 422 | } |
| 423 | |
| 424 | func (t *table) generateHeader() string { |
| 425 | buf := &bytes.Buffer{} |
no test coverage detected