NewObjectBuilder returns an ObjectBuilder. The builder will reserve spaces based on hint about number of adds to reduce times of growing capacity.
(numAddsHint int)
| 368 | // NewObjectBuilder returns an ObjectBuilder. The builder will reserve spaces |
| 369 | // based on hint about number of adds to reduce times of growing capacity. |
| 370 | func NewObjectBuilder(numAddsHint int) *ObjectBuilder { |
| 371 | return &ObjectBuilder{ |
| 372 | pairs: make([]jsonKeyValuePair, 0, numAddsHint), |
| 373 | } |
| 374 | } |
| 375 | |
| 376 | // Add appends key value pair to the sequence. |
| 377 | func (b *ObjectBuilder) Add(k string, v JSON) { |
no outgoing calls
no test coverage detected
searching dependent graphs…