mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-22 12:46:44 +00:00
Add remove-tablewriter.patch
This commit is contained in:
parent
f4817b7a53
commit
a541f84fa3
1 changed files with 36 additions and 0 deletions
36
remove-tablewriter.patch
Normal file
36
remove-tablewriter.patch
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
diff --git a/cmd/geth/dbcmd.go b/cmd/geth/dbcmd.go
|
||||
index c57add065..219417ce8 100644
|
||||
--- a/cmd/geth/dbcmd.go
|
||||
+++ b/cmd/geth/dbcmd.go
|
||||
@@ -41,7 +41,6 @@ import (
|
||||
"github.com/ethereum/go-ethereum/rlp"
|
||||
"github.com/ethereum/go-ethereum/trie"
|
||||
"github.com/ethereum/go-ethereum/triedb"
|
||||
- "github.com/olekukonko/tablewriter"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
@@ -760,10 +759,18 @@ func showMetaData(ctx *cli.Context) error {
|
||||
data = append(data, []string{"headHeader.Root", fmt.Sprintf("%v", h.Root)})
|
||||
data = append(data, []string{"headHeader.Number", fmt.Sprintf("%d (%#x)", h.Number, h.Number)})
|
||||
}
|
||||
-
|
||||
- table := tablewriter.NewWriter(os.Stdout)
|
||||
- table.SetHeader([]string{"Field", "Value"})
|
||||
- table.AppendBulk(data)
|
||||
- table.Render()
|
||||
+
|
||||
+ fmt.Println(strings.Repeat("-", 60))
|
||||
+ fmt.Printf("%-32s | %s\n", "Field", "Value")
|
||||
+ fmt.Println(strings.Repeat("-", 60))
|
||||
+
|
||||
+ for _, row := range data {
|
||||
+ if len(row) == 2 {
|
||||
+ fmt.Printf("%-32s | %s\n", row[0], row[1])
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ fmt.Println(strings.Repeat("-", 60))
|
||||
|
||||
return nil
|
||||
}
|
||||
Loading…
Reference in a new issue