(fj fastJsonNode, uid uint64, attr uint16)
| 520 | } |
| 521 | |
| 522 | func (enc *encoder) SetUID(fj fastJsonNode, uid uint64, attr uint16) error { |
| 523 | // if we're in debug mode, uid may be added second time, skip this |
| 524 | if attr == enc.uidAttr { |
| 525 | fjAttrs := enc.children(fj) |
| 526 | for fjAttrs != nil { |
| 527 | if enc.getAttr(fjAttrs) == attr { |
| 528 | return nil |
| 529 | } |
| 530 | fjAttrs = fjAttrs.next |
| 531 | } |
| 532 | } |
| 533 | |
| 534 | un, err := enc.makeUidNode(attr, uid) |
| 535 | if err != nil { |
| 536 | return err |
| 537 | } |
| 538 | enc.addChildren(fj, un) |
| 539 | return nil |
| 540 | } |
| 541 | |
| 542 | func (enc *encoder) IsEmpty(fj fastJsonNode) bool { |
| 543 | return fj.child == nil |
no test coverage detected