code: func (p *Peer) HasCap(capName string) (yes bool) {
  	if p == nil || p.Peer == nil {
  		return false
  	}
  	for _, c := range p.Caps() {
  		if c.Name == capName {
  			return true
  		}
  	}
  	return false
  }
docs: // HasCap returns true if Peer has a capability
  // with provided name.