Go build fail while replace in go.mod


(chris) #1

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


(Johan Dahl) #2

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


(chris) #3

Tried but failed