This commit is contained in:
2023-09-09 17:42:39 +10:00
parent 5f7befe02c
commit 5050a4fdba
3 changed files with 33 additions and 1 deletions

View File

@@ -1,6 +1,9 @@
package debugframes
import "runtime"
import (
"gitea.suyono.dev/suyono/wingmate/log"
"runtime"
)
type Trace struct {
Frames []runtime.Frame
@@ -14,6 +17,17 @@ func (t *Trace) Trace() []string {
return nil
}
func (t *Trace) AppendFields(h log.FieldsHandler) log.FieldsHandler {
//var slice []string
//
//for _, f := range t.Frames {
// slice = append(slice, fmt.Sprintf("", f.))
//}
//
//
return nil
}
func GetTraces() error {
trace := new(Trace)
pc := make([]uintptr, 16)