Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add equivalent of netipx.IPSet.Contains #25

Open
database64128 opened this issue Jan 23, 2025 · 0 comments
Open

Add equivalent of netipx.IPSet.Contains #25

database64128 opened this issue Jan 23, 2025 · 0 comments

Comments

@database64128
Copy link
Contributor

Currently, to check if an address is included in the set, you have to do something like:

prefix := netip.PrefixFrom(addr, addr.BitLen())
result := s.Encompasses(prefix)

It'd be nice if you could just:

result := s.ContainsAddr(addr)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant