Parses an object line: o
(fields []string)
| 485 | // Parses an object line: |
| 486 | // o <name> |
| 487 | func (dec *Decoder) parseObject(fields []string) error { |
| 488 | |
| 489 | if len(fields) < 1 { |
| 490 | return errors.New("Object line (o) with no fields") |
| 491 | } |
| 492 | |
| 493 | dec.Objects = append(dec.Objects, makeObject(fields[0])) |
| 494 | dec.objCurrent = &dec.Objects[len(dec.Objects)-1] |
| 495 | return nil |
| 496 | } |
| 497 | |
| 498 | // makes an Object with name. |
| 499 | func makeObject(name string) Object { |
no test coverage detected