PushIndex pushes an entry onto the path surrounded by `[` and `]`. pb.Push("foo") // foo pb.PushIndex(1) // foo[1]
(i int)
| 93 | // pb.Push("foo") // foo |
| 94 | // pb.PushIndex(1) // foo[1] |
| 95 | func (b *PathBuffer) PushIndex(i int) { |
| 96 | b.buf = append(b.buf, '[') |
| 97 | b.buf = strconv.AppendInt(b.buf, int64(i), 10) |
| 98 | b.buf = append(b.buf, ']') |
| 99 | b.off = len(b.buf) |
| 100 | } |
| 101 | |
| 102 | // Pop the latest entry off the path. |
| 103 | // |
no outgoing calls