art icon indicating copy to clipboard operation
art copied to clipboard

Proposal for an API change for the Get method

Open gaissmai opened this issue 2 years ago • 0 comments

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

gaissmai avatar Jan 06 '24 09:01 gaissmai