From 92c25b2ed433d6a8c4b3c8c3f8cd1f3c68f8a69a Mon Sep 17 00:00:00 2001 From: Patrick Pacher Date: Wed, 22 Jul 2020 16:17:11 +0200 Subject: [PATCH] Fix linter warnings --- cmds/portmaster-start/run.go | 2 +- updates/upgrader.go | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/cmds/portmaster-start/run.go b/cmds/portmaster-start/run.go index 0efd8fa6..028f3de7 100644 --- a/cmds/portmaster-start/run.go +++ b/cmds/portmaster-start/run.go @@ -188,7 +188,7 @@ func runAndRestart(opts *Options, args []string) error { // if we are constantly failing or a restart was requested // try to update the resources. log.Printf("updating registry index") - updateRegistryIndex(false) + _ = updateRegistryIndex(false) // will always return nil } } } diff --git a/updates/upgrader.go b/updates/upgrader.go index 50aacfa5..88ca22a7 100644 --- a/updates/upgrader.go +++ b/updates/upgrader.go @@ -25,6 +25,7 @@ import ( const ( upgradedSuffix = "-upgraded" + exeExt = ".exe" ) var ( @@ -68,7 +69,7 @@ func upgrader(_ context.Context, _ interface{}) error { func upgradeCoreNotify() error { identifier := "core/portmaster-core" // identifier, use forward slash! if onWindows { - identifier += ".exe" + identifier += exeExt } // check if we can upgrade @@ -125,7 +126,7 @@ func upgradeCoreNotifyActionHandler(n *notifications.Notification) { func upgradePortmasterStart() error { filename := "portmaster-start" if onWindows { - filename += ".exe" + filename += exeExt } // check if we can upgrade @@ -154,7 +155,7 @@ func upgradePortmasterStart() error { func warnOnIncorrectParentPath() { expectedFileName := "portmaster-start" if onWindows { - expectedFileName += ".exe" + expectedFileName += exeExt } // upgrade parent process, if it's portmaster-start