func (r *Registry) HasIP(ip net.IP) (bool, error) {
	r.lock.Lock()
	defer r.lock.Unlock()

	contents, err := r.load()
	if err != nil {
		return false, err
	}

	_, ok := contents.IPs[ip.String()]
	return ok, nil
}
// HasIP checks if an IP is in an registry
HasIP checks if an IP is in an registry
// HasIP checks if an IP is in an registry
func (r *Registry) HasIP(ip net.IP) (bool, error) {
	r.lock.Lock()
	defer r.lock.Unlock()
	contents, err := r.load()
	if err != nil {
		return false, err
	}
	_, ok := contents.IPs[ip.String()]
	return ok, nil
}
func ( r * Registry ) HasIP ( ip net . IP ) ( bool , error ) { r . lock . Lock ( ) defer r . lock . Unlock ( ) contents , err := r . load ( ) if err != nil { return false , err } _ , ok := contents . IPs [ ip . String ( ) ] return ok , nil }
HasIP checks if an IP is in an registry
HasIP checks if an IP is in an registry