Go build fail while replace in go.mod

go version 1.11.4

go.mod:
replace xxxer_backend/public => /data/code/xxxer_backend/public

error:
unknown import path “xxxer_backend/public/conn”: cannot find module providing package xxxer_backend/public/conn

Maybe replace only work on module level and not folders so you have to use it like this

replace xxxer_backend/public/conn => /data/code/xxxer_backend/public/conn

But I really don’t know

Tried but failed

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