Implement review comments

This commit is contained in:
Patrick Pacher
2020-07-17 11:07:46 +02:00
parent 7690793c66
commit 6d69039c20
6 changed files with 49 additions and 47 deletions

View File

@@ -6,7 +6,6 @@ import (
"os"
"path/filepath"
"runtime"
"runtime/pprof"
"time"
"github.com/safing/portbase/container"
@@ -113,18 +112,6 @@ func logControlError(cErr error) {
fmt.Fprintln(errorFile, cErr.Error())
}
//nolint:deadcode,unused // TODO
func logControlStack() {
fp := getPmStartLogFile(".stack.log")
if fp == nil {
return
}
defer fp.Close()
// write error and close
_ = pprof.Lookup("goroutine").WriteTo(fp, 2)
}
//nolint:deadcode,unused // false positive on linux, currently used by windows only
func runAndLogControlError(wrappedFunc func(cmd *cobra.Command, args []string) error) func(cmd *cobra.Command, args []string) error {
return func(cmd *cobra.Command, args []string) error {