(f ast.Expr)
| 622 | } |
| 623 | |
| 624 | func (fs *FileSet) getFieldsFromEmbeddedStruct(f ast.Expr) []gen.StructField { |
| 625 | switch f := f.(type) { |
| 626 | case *ast.Ident: |
| 627 | s := fs.Specs[f.Name] |
| 628 | switch s := s.(type) { |
| 629 | case *ast.StructType: |
| 630 | return fs.parseFieldList(s.Fields) |
| 631 | default: |
| 632 | return nil |
| 633 | } |
| 634 | default: |
| 635 | // other possibilities are disallowed |
| 636 | return nil |
| 637 | } |
| 638 | } |
| 639 | |
| 640 | // extract embedded field name |
| 641 | // |
no test coverage detected