MCPcopy
hub / github.com/uber-go/zap / withStackDepth

Function withStackDepth

internal/stacktrace/stack_test.go:95–106  ·  view source on GitHub ↗
(depth int, f func())

Source from the content-addressed store, hash-verified

93}
94
95func withStackDepth(depth int, f func()) {
96 var recurse func(rune) rune
97 recurse = func(r rune) rune {
98 if r > 0 {
99 bytes.Map(recurse, []byte(string([]rune{r - 1})))
100 } else {
101 f()
102 }
103 return 0
104 }
105 recurse(rune(depth))
106}

Callers 1

TestTakeDeepStackFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected