(r string, wg *sync.WaitGroup, semaphore chan struct{}, dataReceiver chan Project)
| 244 | } |
| 245 | |
| 246 | func (m *CodeBuildModule) getcodeBuildProjectsPerRegion(r string, wg *sync.WaitGroup, semaphore chan struct{}, dataReceiver chan Project) { |
| 247 | defer wg.Done() |
| 248 | |
| 249 | semaphore <- struct{}{} |
| 250 | defer func() { <-semaphore }() |
| 251 | |
| 252 | projects, err := sdk.CachedCodeBuildListProjects(m.CodeBuildClient, aws.ToString(m.Caller.Account), r) |
| 253 | if err != nil { |
| 254 | sharedLogger.Error(err.Error()) |
| 255 | } |
| 256 | |
| 257 | for _, project := range projects { |
| 258 | details, err := sdk.CachedCodeBuildBatchGetProjects(m.CodeBuildClient, aws.ToString(m.Caller.Account), r, project) |
| 259 | if err != nil { |
| 260 | sharedLogger.Error(err.Error()) |
| 261 | } |
| 262 | |
| 263 | dataReceiver <- Project{ |
| 264 | Name: aws.ToString(details.Name), |
| 265 | Region: r, |
| 266 | Role: aws.ToString(details.ServiceRole), |
| 267 | Admin: "", |
| 268 | CanPrivEsc: "", |
| 269 | } |
| 270 | |
| 271 | } |
| 272 | |
| 273 | } |
no test coverage detected