MCPcopy
hub / github.com/restic/restic / goroutineNum

Function goroutineNum

internal/debug/debug.go:119–126  ·  view source on GitHub ↗

taken from https://github.com/VividCortex/trace

()

Source from the content-addressed store, hash-verified

117
118// taken from https://github.com/VividCortex/trace
119func goroutineNum() int {
120 b := make([]byte, 20)
121 runtime.Stack(b, false)
122 var num int
123
124 _, _ = fmt.Sscanf(string(b), "goroutine %d ", &num)
125 return num
126}
127
128// taken from https://github.com/VividCortex/trace
129func getPosition() (fn, dir, file string, line int) {

Callers 1

LogFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected