Open mdelapenya opened 4 weeks ago
Name | Link |
---|---|
Latest commit | cbfdea7c474c6b563b8094ddb827abff01885f3c |
Latest deploy log | https://app.netlify.com/sites/testcontainers-go/deploys/6720b6999366710008b34bb6 |
Deploy Preview | https://deploy-preview-2849--testcontainers-go.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
@mmorel-35 pinging you for a review (if possible), as you worked in the modulegen a lot 🙏
What does this PR do?
This PR adds support for creating a go.work file and managing it when new modules are created using the
modulegen
tool.During this process, we had to rework a bit this code generation tool, using the
modfile
package to handle the workfile programatically. Besides that, we updated the existing tests to check the work files are properly generated, also moving tests to the right package and even removing duplicated tests (e.g. for validation).Finally, we are improving the error messages, following recent patterns we are adopting in the library.
Important to notice the amount of lines in the changeset comes from running
go work sync
, which updated all the dependencies.Why is it important?
Now the go toolchain will be able to handle the core module and its submodules in a proper manner, so it would be much easier to setup the IDE when working on the project. In the past, we generated code for VSCode and handle all the submodules, now it would be possible to just open the root dir, and because of the existence of the
go.work
file, the IDE would be able to follow all links across the entire code base.Related issues