[x] All tests passed. If this feature is not already covered by the tests, I added new tests.
[x] This pull request is on the dev branch.
[x] I used gofmt for formatting the code before submitting the pull request.
Fixes implicit memory aliasing in for loop whereby the targetBuildInfo modules may be reused accidentally:
for i := range targetBuildInfo.Modules {
if newModule.Id == targetBuildInfo.Modules[i].Id {
mergeModules(&newModule, &targetBuildInfo.Modules[i]) // This line is troublesome
}
}
[x] I used gofmt for formatting the code before submitting the pull request.
Fixes implicit memory aliasing in for loop whereby the targetBuildInfo modules may be reused accidentally:
For more info see: https://stackoverflow.com/questions/62446118/implicit-memory-aliasing-in-for-loop/68247837