feat: Comment out replace statements to relative paths in go.mod
Metadata
Current evaluation
No evaluation has been recorded for this issue yet.
Issue body
- [x] Have you followed the guidelines for contributing?
- [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [ ] Have you successfully run `make lint && make test`?
- [ ] Have you added an entry to the changelog (`docs/reference/changelog.rst`)?
---
From the discussion on the PR #1391, this PR adds logic to the `go-use` plugin
1. Checks if a `go.mod` exists or return an error
2. If the go.mod exists, it will remove replace statements that point to relative paths (starts with `./` or `../`)
3. An integration test to ensure this works (with both imports of one-line replace statements & multi line replace() blocks
Note: I need to run make lint & test (I wasn't on an Ubuntu machine when developing this). Will do soon
Evaluation history
No evaluation history available.