NewArrayBuilder returns an ArrayBuilder. The builder will reserve spaces based on hint about number of adds to reduce times of growing capacity.
(numAddsHint int)
| 194 | // NewArrayBuilder returns an ArrayBuilder. The builder will reserve spaces |
| 195 | // based on hint about number of adds to reduce times of growing capacity. |
| 196 | func NewArrayBuilder(numAddsHint int) *ArrayBuilder { |
| 197 | return &ArrayBuilder{ |
| 198 | jsons: make([]JSON, 0, numAddsHint), |
| 199 | } |
| 200 | } |
| 201 | |
| 202 | // Add appends JSON to the sequence. |
| 203 | func (b *ArrayBuilder) Add(j JSON) { |
no outgoing calls
no test coverage detected
searching dependent graphs…