MCPcopy Index your code
hub / github.com/github/git-sizer / addSection

Method addSection

sizes/output.go:408–422  ·  view source on GitHub ↗
(subTable *table)

Source from the content-addressed store, hash-verified

406}
407
408func (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
424func (t *table) generateHeader() string {
425 buf := &bytes.Buffer{}

Callers 2

EmitMethod · 0.80
EmitMethod · 0.80

Calls 3

formatSectionHeaderMethod · 0.95
emitBlankRowMethod · 0.95
StringMethod · 0.45

Tested by

no test coverage detected