Skip to content

Commit

Permalink
Merge pull request #492 from a-hilaly/opmapinit
Browse files Browse the repository at this point in the history
Safely assign resources to the sdk opType maps
  • Loading branch information
a-hilaly authored Jan 20, 2024
2 parents d3b23cd + 3dc7051 commit 6200884
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/model/sdk_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,11 @@ func (a *SDKAPI) GetOperationMap(cfg *ackgenconfig.Config) *OperationMap {
for _, operationType := range opCfg.OperationType {
opType := OpTypeFromString(operationType)
for _, resName := range opCfg.ResourceName {
resMap, ok := opMap[opType]
if !ok {
resMap = map[string]*awssdkmodel.Operation{}
opMap[opType] = resMap
}
opMap[opType][resName] = op
}
}
Expand Down

0 comments on commit 6200884

Please sign in to comment.