AppendNewBlock appends a new nested block to the end of the receiving body with the given type name and labels.
(typeName string, labels []string)
| 238 | // AppendNewBlock appends a new nested block to the end of the receiving body |
| 239 | // with the given type name and labels. |
| 240 | func (b *Body) AppendNewBlock(typeName string, labels []string) *Block { |
| 241 | block := newBlock() |
| 242 | block.init(typeName, labels) |
| 243 | b.appendItem(block) |
| 244 | return block |
| 245 | } |
| 246 | |
| 247 | // AppendNewline appends a newline token to th end of the receiving body, |
| 248 | // which generally serves as a separator between different sets of body |