Skip to content

Commit 41e42f1

Browse files
zeidlitzquakj
authored andcommitted
lint: address issues
1 parent 28236ea commit 41e42f1

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

main.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,10 @@ func observeIPv4(link netlink.Link, client client4.Client) error {
128128
}
129129

130130
addrs, err := netlink.AddrList(link, netlink.FAMILY_V4)
131+
if err != nil {
132+
return fmt.Errorf("getting address list: %w", err)
133+
}
134+
131135
for _, address := range addrs {
132136
if address.IP.Equal(addr.IP) {
133137
return nil
@@ -159,6 +163,10 @@ func observeIPv6(link netlink.Link, client client6.Client) error {
159163
}
160164

161165
addrs, err := netlink.AddrList(link, netlink.FAMILY_V6)
166+
if err != nil {
167+
return fmt.Errorf("getting address list: %w", err)
168+
}
169+
162170
for _, address := range addrs {
163171
if address.IP.Equal(addr6.IP) {
164172
return nil

0 commit comments

Comments
 (0)