EncodeArrayFunc is a custom func type implementing MarshaleArray. Use it to cast a func(*Encoder) to Marshal an object. enc := gojay.NewEncoder(io.Writer) enc.EncodeArray(gojay.EncodeArrayFunc(func(enc *gojay.Encoder) { enc.AddStringKey("hello", "world") }))
func(*Encoder)
| 200 | // enc.AddStringKey("hello", "world") |
| 201 | // })) |
| 202 | type EncodeArrayFunc func(*Encoder) |
| 203 | |
| 204 | // MarshalJSONArray implements MarshalerJSONArray. |
| 205 | func (f EncodeArrayFunc) MarshalJSONArray(enc *Encoder) { |
no outgoing calls
no test coverage detected
searching dependent graphs…