code: func (ps *peerSet) AllPeers() []*peer {
  	ps.lock.RLock()
  	defer ps.lock.RUnlock()
  
  	list := make([]*peer, len(ps.peers))
  	i := 0
  	for _, peer := range ps.peers {
  		list[i] = peer
  		i++
  	}
  	return list
  }
docs: // AllPeers returns all peers in a list