mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-24 21:56:43 +00:00
fix typo
This commit is contained in:
parent
810a32fb7e
commit
daacc4f520
1 changed files with 5 additions and 5 deletions
|
|
@ -86,11 +86,11 @@ func (t *Table) render() error {
|
||||||
}
|
}
|
||||||
|
|
||||||
widths := t.calculateColumnWidths()
|
widths := t.calculateColumnWidths()
|
||||||
separator := t.buildSeparator(widths)
|
rowSeparator := t.buildRowSeparator(widths)
|
||||||
|
|
||||||
if len(t.headers) > 0 {
|
if len(t.headers) > 0 {
|
||||||
t.printRow(t.headers, widths)
|
t.printRow(t.headers, widths)
|
||||||
fmt.Fprintln(t.out, separator)
|
fmt.Fprintln(t.out, rowSeparator)
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, row := range t.rows {
|
for _, row := range t.rows {
|
||||||
|
|
@ -98,7 +98,7 @@ func (t *Table) render() error {
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(t.footer) > 0 {
|
if len(t.footer) > 0 {
|
||||||
fmt.Fprintln(t.out, separator)
|
fmt.Fprintln(t.out, rowSeparator)
|
||||||
t.printRow(t.footer, widths)
|
t.printRow(t.footer, widths)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -168,12 +168,12 @@ func (t *Table) calculateColumnWidths() []int {
|
||||||
return widths
|
return widths
|
||||||
}
|
}
|
||||||
|
|
||||||
// buildSeparator creates a horizontal line to separate table sections.
|
// buildRowSeparator creates a horizontal line to separate table rows.
|
||||||
//
|
//
|
||||||
// It generates a string with dashes (-) for each column width, joined by plus signs (+).
|
// It generates a string with dashes (-) for each column width, joined by plus signs (+).
|
||||||
//
|
//
|
||||||
// Example output: "----------+--------+-----------"
|
// Example output: "----------+--------+-----------"
|
||||||
func (t *Table) buildSeparator(widths []int) string {
|
func (t *Table) buildRowSeparator(widths []int) string {
|
||||||
parts := make([]string, len(widths))
|
parts := make([]string, len(widths))
|
||||||
for i, w := range widths {
|
for i, w := range widths {
|
||||||
parts[i] = strings.Repeat("-", w)
|
parts[i] = strings.Repeat("-", w)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue