code: func (ps *peerSet) Register(p *peer) error {
  	ps.lock.Lock()
  	defer ps.lock.Unlock()
  
  	if ps.closed {
  		return errClosed
  	}
  	if _, ok := ps.peers[p.id]; ok {
  		return errAlreadyRegistered
  	}
  	ps.peers[p.id] = p
  	go p.broadcast()
  
  	return nil
  }
docs: // Register injects a new peer into the working set, or returns an error if the
  // peer is already known. If a new peer it registered, its broadcast loop is also
  // started.