art
art copied to clipboard
Proposal for an API change for the Get method
func (t *Table[T]) Get(addr netip.Addr) (lpm netip.Prefix, ret T, ok bool)
Often it is not only the value that is interesting but also the longest prefix that matched.
Or maybe you add a Lookup() method:
func (t *Table[T]) Lookup(addr netip.Addr) (lpm netip.Prefix, ret T, ok bool)
Thanks for ART