Skip to content

Commit c88525b

Browse files
committed
table.String(), table.generateLines(): inline methods
1 parent b2dfdb3 commit c88525b

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

sizes/output.go

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -330,11 +330,9 @@ func (s HistorySize) TableString(threshold Threshold, nameStyle NameStyle) strin
330330
footnotes: NewFootnotes(),
331331
}
332332

333-
return t.String()
334-
}
335-
336-
func (t *table) String() string {
337-
linesString := t.generateLines()
333+
buf := &bytes.Buffer{}
334+
t.contents.Emit(&t, buf, -1)
335+
linesString := buf.String()
338336
return linesString + t.footnotes.String()
339337
}
340338

@@ -345,12 +343,6 @@ func (t *table) generateHeader() string {
345343
return buf.String()
346344
}
347345

348-
func (t *table) generateLines() string {
349-
buf := &bytes.Buffer{}
350-
t.contents.Emit(t, buf, -1)
351-
return buf.String()
352-
}
353-
354346
func (t *table) emitBlankRow(buf io.Writer) {
355347
t.formatRow(buf, 0, "", "", "", "", "")
356348
}

0 commit comments

Comments
 (0)