1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-08-06 11:31:54 +08:00

ipfs swarm peers: sort output

This commit is contained in:
Juan Batiz-Benet
2015-01-20 05:50:50 -08:00
parent 773ee2e25d
commit 010cedf0a9

View File

@ -5,6 +5,7 @@ import (
"fmt"
"io"
"path"
"sort"
cmds "github.com/jbenet/go-ipfs/commands"
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.
addrs[i] = fmt.Sprintf("%s/%s", addr, pid.Pretty())
}
sort.Sort(sort.StringSlice(addrs))
return &stringList{addrs}, nil
},
Marshalers: cmds.MarshalerMap{