ImageToCodeGeneratorRequest returns a new CodeGeneratorRequest for the Image. All non-imports are added as files to generate. If includeImports is set, all non-well-known-type imports are also added as files to generate. If includeWellKnownTypes is set, well-known-type imports are also added as fil
( image Image, parameter string, compilerVersion *pluginpb.Version, includeImports bool, includeWellKnownTypes bool, )
| 583 | // If includeWellKnownTypes is set, well-known-type imports are also added as files to generate. |
| 584 | // includeWellKnownTypes has no effect if includeImports is not set. |
| 585 | func ImageToCodeGeneratorRequest( |
| 586 | image Image, |
| 587 | parameter string, |
| 588 | compilerVersion *pluginpb.Version, |
| 589 | includeImports bool, |
| 590 | includeWellKnownTypes bool, |
| 591 | ) (*pluginpb.CodeGeneratorRequest, error) { |
| 592 | return imageToCodeGeneratorRequest( |
| 593 | image, |
| 594 | parameter, |
| 595 | compilerVersion, |
| 596 | includeImports, |
| 597 | includeWellKnownTypes, |
| 598 | nil, |
| 599 | nil, |
| 600 | ) |
| 601 | } |
| 602 | |
| 603 | // ImagesToCodeGeneratorRequests converts the Images to CodeGeneratorRequests. |
| 604 | // |
searching dependent graphs…