MCPcopy
hub / github.com/CodisLabs/codis / Trace

Function Trace

extern/deprecated/redis-test/utils.go:564–577  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

562}
563
564func Trace() (r string, ss []string, full bool) {
565 bs := make([]byte, 16*1024)
566 if n := runtime.Stack(bs, false); n != len(bs) {
567 bs, full = bs[:n], true
568 } else {
569 bs = append(bs, []byte(" ...\n")...)
570 }
571 ss = strings.Split(string(bs), "\n")
572 for i := 0; i < len(ss); i++ {
573 ss[i] = strings.TrimSpace(ss[i])
574 }
575 r, ss = ss[0], ss[1:]
576 return
577}
578
579func Panic(format string, args ...interface{}) {
580 const tab = " "

Callers 1

PanicFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected