Function
frontBackSplit
(source fastJsonNode,
frontRef *fastJsonNode, backRef *fastJsonNode)
Source from the content-addressed store, hash-verified
| 178 | } |
| 179 | |
| 180 | func frontBackSplit(source fastJsonNode, |
| 181 | frontRef *fastJsonNode, backRef *fastJsonNode) { |
| 182 | slow := source |
| 183 | fast := source.next |
| 184 | |
| 185 | for fast != nil { |
| 186 | fast = fast.next |
| 187 | if fast != nil { |
| 188 | slow = slow.next |
| 189 | fast = fast.next |
| 190 | } |
| 191 | } |
| 192 | |
| 193 | *frontRef = source |
| 194 | *backRef = slow.next |
| 195 | slow.next = nil |
| 196 | } |
| 197 | |
| 198 | func (enc *encoder) idForAttr(attr string) uint16 { |
| 199 | if attr == "uid" && enc.uidAttr > 0 { |
Tested by
no test coverage detected