Fix tests and linters
This commit is contained in:
@@ -2,6 +2,7 @@ package status
|
||||
|
||||
import "github.com/safing/portbase/config"
|
||||
|
||||
// Configuration Keys.
|
||||
var (
|
||||
CfgEnableNetworkRatingSystemKey = "core/enableNetworkRating"
|
||||
cfgEnableNetworkRatingSystem config.BoolOption
|
||||
@@ -33,6 +34,6 @@ func NetworkRatingEnabled() bool {
|
||||
}
|
||||
|
||||
// SetNetworkRating enables or disables the network rating system.
|
||||
func SetNetworkRating(enabled bool) {
|
||||
config.SetConfigOption(CfgEnableNetworkRatingSystemKey, enabled)
|
||||
func SetNetworkRating(enabled bool) error {
|
||||
return config.SetConfigOption(CfgEnableNetworkRatingSystemKey, enabled)
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ func getHighestMitigationLevel() uint8 {
|
||||
threats.RLock()
|
||||
defer threats.RUnlock()
|
||||
|
||||
var level uint8 = SecurityLevelNormal
|
||||
level := SecurityLevelNormal
|
||||
for _, lvl := range threats.list {
|
||||
if lvl > level {
|
||||
level = lvl
|
||||
|
||||
@@ -9,9 +9,7 @@ import (
|
||||
"github.com/safing/portmaster/netenv"
|
||||
)
|
||||
|
||||
var (
|
||||
module *modules.Module
|
||||
)
|
||||
var module *modules.Module
|
||||
|
||||
func init() {
|
||||
module = modules.Register("status", prepare, start, nil, "base", "config")
|
||||
|
||||
@@ -8,9 +8,7 @@ import (
|
||||
"github.com/safing/portmaster/netenv"
|
||||
)
|
||||
|
||||
var (
|
||||
pushUpdate runtime.PushFunc
|
||||
)
|
||||
var pushUpdate runtime.PushFunc
|
||||
|
||||
func setupRuntimeProvider() (err error) {
|
||||
// register the system status getter
|
||||
|
||||
Reference in New Issue
Block a user