mirror of
https://github.com/safing/portbase
synced 2025-09-01 18:19:57 +00:00
Move debug util to separate pkg to avoid import loop
This commit is contained in:
parent
c083e215a3
commit
7c7340c2e7
2 changed files with 4 additions and 5 deletions
|
@ -6,7 +6,7 @@ import (
|
|||
"os"
|
||||
"runtime/pprof"
|
||||
|
||||
"github.com/safing/portbase/utils/osdetail"
|
||||
"github.com/safing/portbase/utils/debug"
|
||||
)
|
||||
|
||||
func registerDebugEndpoints() error {
|
||||
|
@ -65,7 +65,7 @@ func printStack(_ *Request) (msg string, err error) {
|
|||
// debugInfo returns the debugging information for support requests.
|
||||
func debugInfo(ar *Request) (data []byte, err error) {
|
||||
// Create debug information helper.
|
||||
di := new(osdetail.DebugInfo)
|
||||
di := new(debug.DebugInfo)
|
||||
di.Style = ar.Request.URL.Query().Get("style")
|
||||
|
||||
// Add debug information.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package osdetail
|
||||
package debug
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
|
@ -7,9 +7,8 @@ import (
|
|||
"runtime/pprof"
|
||||
"time"
|
||||
|
||||
"github.com/safing/portbase/log"
|
||||
|
||||
"github.com/safing/portbase/info"
|
||||
"github.com/safing/portbase/log"
|
||||
"github.com/safing/portbase/modules"
|
||||
"github.com/shirou/gopsutil/host"
|
||||
)
|
Loading…
Add table
Reference in a new issue