Fix linter warnings
This commit is contained in:
@@ -188,7 +188,7 @@ func runAndRestart(opts *Options, args []string) error {
|
|||||||
// if we are constantly failing or a restart was requested
|
// if we are constantly failing or a restart was requested
|
||||||
// try to update the resources.
|
// try to update the resources.
|
||||||
log.Printf("updating registry index")
|
log.Printf("updating registry index")
|
||||||
updateRegistryIndex(false)
|
_ = updateRegistryIndex(false) // will always return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ import (
|
|||||||
|
|
||||||
const (
|
const (
|
||||||
upgradedSuffix = "-upgraded"
|
upgradedSuffix = "-upgraded"
|
||||||
|
exeExt = ".exe"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@@ -68,7 +69,7 @@ func upgrader(_ context.Context, _ interface{}) error {
|
|||||||
func upgradeCoreNotify() error {
|
func upgradeCoreNotify() error {
|
||||||
identifier := "core/portmaster-core" // identifier, use forward slash!
|
identifier := "core/portmaster-core" // identifier, use forward slash!
|
||||||
if onWindows {
|
if onWindows {
|
||||||
identifier += ".exe"
|
identifier += exeExt
|
||||||
}
|
}
|
||||||
|
|
||||||
// check if we can upgrade
|
// check if we can upgrade
|
||||||
@@ -125,7 +126,7 @@ func upgradeCoreNotifyActionHandler(n *notifications.Notification) {
|
|||||||
func upgradePortmasterStart() error {
|
func upgradePortmasterStart() error {
|
||||||
filename := "portmaster-start"
|
filename := "portmaster-start"
|
||||||
if onWindows {
|
if onWindows {
|
||||||
filename += ".exe"
|
filename += exeExt
|
||||||
}
|
}
|
||||||
|
|
||||||
// check if we can upgrade
|
// check if we can upgrade
|
||||||
@@ -154,7 +155,7 @@ func upgradePortmasterStart() error {
|
|||||||
func warnOnIncorrectParentPath() {
|
func warnOnIncorrectParentPath() {
|
||||||
expectedFileName := "portmaster-start"
|
expectedFileName := "portmaster-start"
|
||||||
if onWindows {
|
if onWindows {
|
||||||
expectedFileName += ".exe"
|
expectedFileName += exeExt
|
||||||
}
|
}
|
||||||
|
|
||||||
// upgrade parent process, if it's portmaster-start
|
// upgrade parent process, if it's portmaster-start
|
||||||
|
|||||||
Reference in New Issue
Block a user