ipfs swarm peers: sort output
Juan Batiz-Benet committed
Jan 20, 2015 at 05:50 UTC
010cedf0a9893c4a63ee69cb2faef332412c404e
1 file changed
+2
core/commands/swarm.go
+2
@@ -5,6 +5,7 @@ import (
5
"fmt"
6
"io"
7
"path"
8
+ "sort"
9
10
cmds "github.com/jbenet/go-ipfs/commands"
11
peer "github.com/jbenet/go-ipfs/p2p/peer"
@@ -64,6 +65,7 @@ ipfs swarm peers lists the set of peers this node is connected to.
65
addrs[i] = fmt.Sprintf("%s/%s", addr, pid.Pretty())
66
}
67
68
+ sort.Sort(sort.StringSlice(addrs))
69
return &stringList{addrs}, nil
70
},
71
Marshalers: cmds.MarshalerMap{