( ctx context.Context, moduleReadBucket bufmodule.ModuleReadBucket, functionOptions *functionOptions, )
| 1187 | } |
| 1188 | |
| 1189 | func (c *controller) buildImage( |
| 1190 | ctx context.Context, |
| 1191 | moduleReadBucket bufmodule.ModuleReadBucket, |
| 1192 | functionOptions *functionOptions, |
| 1193 | ) (bufimage.Image, error) { |
| 1194 | var options []bufimage.BuildImageOption |
| 1195 | if functionOptions.imageExcludeSourceInfo { |
| 1196 | options = append(options, bufimage.WithExcludeSourceCodeInfo()) |
| 1197 | } |
| 1198 | image, err := bufimage.BuildImage( |
| 1199 | ctx, |
| 1200 | c.logger, |
| 1201 | moduleReadBucket, |
| 1202 | options..., |
| 1203 | ) |
| 1204 | if err != nil { |
| 1205 | return nil, err |
| 1206 | } |
| 1207 | return filterImage(image, functionOptions, true) |
| 1208 | } |
| 1209 | |
| 1210 | // buildTargetImageWithConfigs builds an image for each module in the workspace. |
| 1211 | // This is used to associate LintConfig and BreakingConfig on a per-module basis. |
no test coverage detected