Skip to content

Commit 6200884

Browse files
authored
Merge pull request #492 from a-hilaly/opmapinit
Safely assign resources to the sdk opType maps
2 parents d3b23cd + 3dc7051 commit 6200884

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkg/model/sdk_api.go

+5
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,11 @@ func (a *SDKAPI) GetOperationMap(cfg *ackgenconfig.Config) *OperationMap {
111111
for _, operationType := range opCfg.OperationType {
112112
opType := OpTypeFromString(operationType)
113113
for _, resName := range opCfg.ResourceName {
114+
resMap, ok := opMap[opType]
115+
if !ok {
116+
resMap = map[string]*awssdkmodel.Operation{}
117+
opMap[opType] = resMap
118+
}
114119
opMap[opType][resName] = op
115120
}
116121
}

0 commit comments

Comments
 (0)