Skip to content

Commit afc710d

Browse files
committed
fix copy funcs
1 parent a5985ec commit afc710d

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

pkg/awsvpc/parser.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ func CopyAWSresourcesContainer(rc common.ResourcesContainerInf) (*AWSresourcesCo
4444
if !ok {
4545
return nil, fmt.Errorf("error casting resources to *aws.ResourcesContainerModel type")
4646
}
47-
return &AWSresourcesContainer{ResourcesContainer: *awsResources}, nil
47+
awsRC := NewAWSresourcesContainer()
48+
awsRC.ResourcesContainer = *awsResources
49+
return awsRC, nil
4850
}
4951

5052
// parseResourcesFromFile returns aws.ResourcesContainer object, containing the configured resources structs

pkg/ibmvpc/parser.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@ func CopyIBMresourcesContainer(rc common.ResourcesContainerInf) (*IBMresourcesCo
7272
if !ok {
7373
return nil, fmt.Errorf("error casting resources to *datamodel.ResourcesContainerModel type")
7474
}
75-
return &IBMresourcesContainer{ResourcesContainerModel: *ibmResources}, nil
75+
ibmRC := NewIBMresourcesContainer()
76+
ibmRC.ResourcesContainerModel = *ibmResources
77+
return ibmRC, nil
7678
}
7779

7880
func mergeResourcesContainers(rc1, rc2 *IBMresourcesContainer) (*IBMresourcesContainer, error) {

0 commit comments

Comments
 (0)