Push an entry onto the path, adding a `.` separator as needed. pb.Push("foo") // foo pb.Push("bar") // foo.bar
(s string)
| 81 | // pb.Push("foo") // foo |
| 82 | // pb.Push("bar") // foo.bar |
| 83 | func (b *PathBuffer) Push(s string) { |
| 84 | if len(b.buf) > 0 { |
| 85 | b.buf = append(b.buf, '.') |
| 86 | } |
| 87 | b.buf = append(b.buf, s...) |
| 88 | b.off = len(b.buf) |
| 89 | } |
| 90 | |
| 91 | // PushIndex pushes an entry onto the path surrounded by `[` and `]`. |
| 92 | // |
no outgoing calls