Remove the "found" return value from Peers Fetch method
Callers can simply check whether the returned *Peer is nil.
This commit is contained in:
1 parent
5e10b901a3
commit
e50b1f1fe7
5 files changed
+10
-14
No files matched your search
@@ -34,7 +34,7 @@ func (peers *Peers) AddTestRemoteConnection(p1, p2 *Peer) {
|
||||
|
||||
func (peers *Peers) DeleteTestConnection(p *Peer) {
|
||||
toName := p.Name
|
||||
toPeer, _ := peers.Fetch(toName)
|
||||
toPeer := peers.Fetch(toName)
|
||||
peers.Dereference(toPeer)
|
||||
conn, _ := peers.ourself.ConnectionTo(toName)
|
||||
peers.ourself.deleteConnection(conn)
|
||||
|
||||
Reference in new issue
Block a user