Stable net peers output
License: MIT Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
This commit is contained in:
parent
f16cc0322e
commit
9fa46dbac3
@ -2,6 +2,8 @@ package cli
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"gopkg.in/urfave/cli.v2"
|
||||
|
||||
@ -34,6 +36,10 @@ var netPeers = &cli.Command{
|
||||
return err
|
||||
}
|
||||
|
||||
sort.Slice(peers, func(i, j int) bool {
|
||||
return strings.Compare(string(peers[i].ID), string(peers[j].ID)) > 0
|
||||
})
|
||||
|
||||
for _, peer := range peers {
|
||||
fmt.Println(peer)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user