NewArrayBuilder returns an ArrayBuilder. The builder will reserve spaces based on hint about number of adds to reduce times of growing capacity.
(numAddsHint int)
| 273 | // NewArrayBuilder returns an ArrayBuilder. The builder will reserve spaces |
| 274 | // based on hint about number of adds to reduce times of growing capacity. |
| 275 | func NewArrayBuilder(numAddsHint int) *ArrayBuilder { |
| 276 | return &ArrayBuilder{ |
| 277 | jsons: make([]JSON, 0, numAddsHint), |
| 278 | } |
| 279 | } |
| 280 | |
| 281 | // Add appends JSON to the sequence. |
| 282 | func (b *ArrayBuilder) Add(j JSON) { |
no outgoing calls
no test coverage detected
searching dependent graphs…