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

Method FormatStack

internal/stacktrace/stack.go:160–167  ·  view source on GitHub ↗

FormatStack formats all remaining frames in the provided stacktrace -- minus the final runtime.main/runtime.goexit frame.

(stack *Stack)

Source from the content-addressed store, hash-verified

158// FormatStack formats all remaining frames in the provided stacktrace -- minus
159// the final runtime.main/runtime.goexit frame.
160func (sf *Formatter) FormatStack(stack *Stack) {
161 // Note: On the last iteration, frames.Next() returns false, with a valid
162 // frame, but we ignore this frame. The last frame is a runtime frame which
163 // adds noise, since it's only either runtime.main or runtime.goexit.
164 for frame, more := stack.Next(); more; frame, more = stack.Next() {
165 sf.FormatFrame(frame)
166 }
167}
168
169// FormatFrame formats the given frame.
170func (sf *Formatter) FormatFrame(frame runtime.Frame) {

Callers 2

checkMethod · 0.95
TakeFunction · 0.95

Calls 2

FormatFrameMethod · 0.95
NextMethod · 0.80

Tested by

no test coverage detected