code: func (db *SnapshotDB) IsInWhitelist(c context.Context, ip net.IP, whitelist string) (bool, error) {
  	for _, ipnet := range db.whitelists[whitelist] {
  		if ipnet.Contains(ip) {
  			return true, nil
  		}
  	}
  	return false, nil
  }
docs: // IsInWhitelist returns true if IP address belongs to given named IP whitelist.
  //
  // IP whitelist is a set of IP subnets. Unknown IP whitelists are considered
  // empty. May return errors if underlying datastore has issues.