code: func (wl *BasicNet) Permitted(ip net.IP) bool {
  	if !validIP(ip) { // see whitelist.go for this function
  		return false
  	}
  
  	wl.lock.Lock()
  	defer wl.lock.Unlock()
  	for i := range wl.whitelist {
  		if wl.whitelist[i].Contains(ip) {
  			return true
  		}
  	}
  	return false
  }
docs: // Permitted returns true if the IP has been whitelisted.