How to fix parsing go.mod module declares its path as “x” but was required as “y”

I think the problem comes from the fact that the go.mod of your cloned version of original-project still says module You should use the go.mod replace directive. It is meant for cases like yours exactly.

replace => /path/to/x/my-version

Leave a Comment