diff --git a/internal/arpdb/arpdb.go b/internal/arpdb/arpdb.go index 2d1ffd46..13cabd0c 100644 --- a/internal/arpdb/arpdb.go +++ b/internal/arpdb/arpdb.go @@ -77,11 +77,13 @@ func newNeighbor(host, ipStr, macStr string) (n *Neighbor, err error) { ip, err := netip.ParseAddr(ipStr) if err != nil { + // Don't wrap the error, as it will get annotated. return nil, err } mac, err := net.ParseMAC(macStr) if err != nil { + // Don't wrap the error, as it will get annotated. return nil, err } @@ -155,6 +157,8 @@ func (ns *neighs) reset(with []Neighbor) { // parseNeighsFunc parses the text from sc as if it'd be an output of some // ARP-related command. lenHint is a hint for the size of the allocated slice // of Neighbors. +// +// TODO(s.chzhen): Return []*Neighbor instead. type parseNeighsFunc func(logger *slog.Logger, sc *bufio.Scanner, lenHint int) (ns []Neighbor) // cmdARPDB is the implementation of the [Interface] that uses command line to