net/interfaces: fix staticcheck error on darwin

This commit is contained in:
Brad Fitzpatrick 2021-02-14 21:17:12 -08:00
parent d7569863b5
commit e923639feb
1 changed files with 2 additions and 2 deletions

View File

@ -47,11 +47,11 @@ func DefaultRouteInterfaceIndex() (int, error) {
rib, err := route.FetchRIB(syscall.AF_UNSPEC, syscall.NET_RT_DUMP2, 0)
if err != nil {
return 0, fmt.Errorf("FetchRIB: %w", err)
return 0, fmt.Errorf("route.FetchRIB: %w", err)
}
msgs, err := route.ParseRIB(syscall.NET_RT_IFLIST2, rib)
if err != nil {
return 0, fmt.Errorf("Parse: %w", err)
return 0, fmt.Errorf("route.ParseRIB: %w", err)
}
indexSeen := map[int]int{} // index => count
for _, m := range msgs {