go module declares its path as: github.com/unknwon/com

The following prompt appears when installing a third-party package using go mod tidy and go get today:
module declares its path as: ××× but was required as: ×××

Use a command replace provided by go mod to add a section outside the require in the go.mod file

replace github.com/Unknwon/com => github.com/unknwon/com v0.0.0-20190804042917-757f69c95f3e

Use replace to point the wrong parsed github.com/Unknwon/com to the correct new github.com/unknwon/com
But I need to add a v0.0.0-20190804042917-757f69c95f3e later here, other packages should not need to add this

Leave a Reply

Your email address will not be published. Required fields are marked *