MCPcopy
hub / github.com/duke-git/lancet / formatSlice

Method formatSlice

xerror/stack.go:182–191  ·  view source on GitHub ↗

formatSlice will format this StackTrace into the given buffer as a slice of Frame, only valid when called with '%s' or '%v'.

(s fmt.State, verb rune)

Source from the content-addressed store, hash-verified

180// formatSlice will format this StackTrace into the given buffer as a slice of
181// Frame, only valid when called with '%s' or '%v'.
182func (st StackTrace) formatSlice(s fmt.State, verb rune) {
183 _, _ = io.WriteString(s, "[")
184 for i, f := range st {
185 if i > 0 {
186 _, _ = io.WriteString(s, " ")
187 }
188 f.Format(s, verb)
189 }
190 _, _ = io.WriteString(s, "]")
191}
192
193func (s *stack) Format(st fmt.State, verb rune) {
194 switch verb {

Callers 1

FormatMethod · 0.95

Calls 1

FormatMethod · 0.45

Tested by

no test coverage detected