Implement review comments
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user