MCPcopy Create free account
hub / github.com/dispatchrun/wazergo / formatArray

Function formatArray

types/format.go:108–117  ·  view source on GitHub ↗
(w io.Writer, v reflect.Value)

Source from the content-addressed store, hash-verified

106}
107
108func formatArray(w io.Writer, v reflect.Value) {
109 io.WriteString(w, "[")
110 for i, n := 0, v.Len(); i < n; i++ {
111 if i != 0 {
112 io.WriteString(w, ",")
113 }
114 format(w, v.Index(i))
115 }
116 io.WriteString(w, "]")
117}
118
119func formatStruct(w io.Writer, v reflect.Value) {
120 io.WriteString(w, "{")

Callers 1

formatFunction · 0.85

Calls 4

formatFunction · 0.85
WriteStringMethod · 0.80
LenMethod · 0.80
IndexMethod · 0.45

Tested by

no test coverage detected