mirror of
https://github.com/status-im/status-go-monitor.git
synced 2025-02-04 15:34:10 +00:00
add AsTable method to print peer in a table
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
fba5f56834
commit
b7fd7b20ed
4
json.go
4
json.go
@ -17,6 +17,10 @@ func (p Peer) String() string {
|
||||
|
||||
type peerId string
|
||||
|
||||
func (p Peer) AsTable() string {
|
||||
return fmt.Sprintf("%15s | what", p.Id)
|
||||
}
|
||||
|
||||
// the ID is too long to display in full in most places
|
||||
func (id peerId) String() string {
|
||||
return fmt.Sprintf("%s...%s",
|
||||
|
Loading…
x
Reference in New Issue
Block a user