IncludeReference only generates types if they are referenced from the generated packages. This is useful for only generating a subset of the types that are being used.
(directory string, prefix string)
| 150 | // IncludeReference only generates types if they are referenced from the generated packages. |
| 151 | // This is useful for only generating a subset of the types that are being used. |
| 152 | func (p *GoParser) IncludeReference(directory string, prefix string) error { |
| 153 | return p.include(directory, prefix, true) |
| 154 | } |
| 155 | |
| 156 | func (p *GoParser) include(directory string, prefix string, reference bool) error { |
| 157 | pkgs, err := packages.Load(p.config, directory) |