Fix linter/tests
This commit is contained in:
@@ -2,6 +2,7 @@ package base
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
_ "github.com/safing/portbase/config"
|
_ "github.com/safing/portbase/config"
|
||||||
|
_ "github.com/safing/portbase/metrics"
|
||||||
"github.com/safing/portbase/modules"
|
"github.com/safing/portbase/modules"
|
||||||
_ "github.com/safing/portbase/rng"
|
_ "github.com/safing/portbase/rng"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/ghodss/yaml"
|
"github.com/ghodss/yaml"
|
||||||
|
|
||||||
"github.com/safing/portbase/api"
|
"github.com/safing/portbase/api"
|
||||||
"github.com/safing/portbase/log"
|
"github.com/safing/portbase/log"
|
||||||
"github.com/safing/portbase/utils"
|
"github.com/safing/portbase/utils"
|
||||||
@@ -82,7 +83,7 @@ func registerAPIEndpoints() error {
|
|||||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
defer file.Close() //nolint:errcheck
|
defer file.Close() //nolint:errcheck,gosec
|
||||||
|
|
||||||
// Assign file to reader
|
// Assign file to reader
|
||||||
var reader io.Reader = file
|
var reader io.Reader = file
|
||||||
|
|||||||
Reference in New Issue
Block a user