-modfile flag usage

Since go 1.14 -modfile flag has been introduced. There are very little results on its usage on stackoverflow or elsewhere. In order to not to deal with merge conflicts from release and develop branches, we have come up with a scenario to have go.mod and release.mod both the files in root directory and use go.mod for develop builds and release.mod for release branch builds. Is anyone here using similar approach or think this is a bad approach? Any feedback is appreciated.

1 Like

Hi @anudeep,

My £0.02: the problem seems to be typically solved in other ways, otherwise the flag would be much more popular and appear in more search results.

I am just a hobbyist Go programmer who only writes code in Go for myself, so I’m not really familiar with infrastructure- and prod/test-related issues like this, but are test cases the reason that dev requires additional modules that aren’t included in production builds?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.