Fix golangci-lint findings

This commit is contained in:
2026-10-20 15:28:00 +00:00
parent 08c871f84b
commit 222877a847
2 changed files with 8 additions and 5 deletions
+4 -1
View File
@@ -91,7 +91,10 @@ func main() {
// Subscribe to route-change events
routeSubChan, routeSubDoneChan := make(chan netlink.RouteUpdate), make(chan struct{})
netlink.RouteSubscribe(routeSubChan, routeSubDoneChan)
err = netlink.RouteSubscribe(routeSubChan, routeSubDoneChan)
if err != nil {
logger.Error.Fatalf("Couldn't subscribe to route-changes: %s", err)
}
go handleRouteEvents(routeSubChan, filterOptions, iface)
//# Initial Route-setup
+2 -2
View File
@@ -33,7 +33,7 @@ func init() {
ByName[mapType], ById[mapType], err = readFromFile(filePath)
if err != nil {
Errors = append(Errors,
fmt.Errorf("failed reading mapping-file '%s': %s", filePath, err),
fmt.Errorf("failed reading mapping-file '%s': %w", filePath, err),
)
}
}
@@ -63,7 +63,7 @@ func readFromFile(filePath string) (mapByName map[string]int, mapById map[int]st
if err != nil {
// Only warn as we can continue processing the file
Errors = append(Errors,
fmt.Errorf("mappig-data invalid '%s': %s", text, err),
fmt.Errorf("mappig-data invalid '%s': %w", text, err),
)
continue
}