got problem when replace github.com/apache/rocketmq-clients/golang to my github fork in go.mod

34 Views Asked by At

i use this in my go.mod:

require github.com/apache/rocketmq-clients/golang v0.0.0-20230321063829-41bfbcf6130d

and i want to replace it to my fork: github.com/ainokiseki/rocketmq-clients/golang

first i try:

replace github.com/apache/rocketmq-clients/golang => github.com/ainokiseki/rocketmq-clients/golang master

but i get:

replace github.com/ainokiseki/rocketmq-clients/golang: version "v0.0.0-20230925081057-23da93ce6e7d" invalid: golang/go.mod has post-v0 module path "github.com/apache/rocketmq-clients/golang/v5" at revision 23da93ce6e7d

then i try:

replace github.com/apache/rocketmq-clients/golang/v5 => github.com/ainokiseki/rocketmq-clients/golang master

and i get:

replace github.com/ainokiseki/rocketmq-clients/golang: version "v0.0.0-20230925081057-23da93ce6e7d" invalid: golang/go.mod has post-v0 module path "github.com/apache/rocketmq-clients/golang/v5" at revision 23da93ce6e7d

finally i try:

replace github.com/apache/rocketmq-clients/golang/v5 => github.com/ainokiseki/rocketmq-clients/golang/v5 master

this time running go mod tidy did not meet any error, but it doesn't work, still the apache repo, not my repo. my go.mod looks like: replace github.com/apache/rocketmq-clients/golang/v5 => github.com/ainokiseki/rocketmq-clients/golang/v5 v5.0.0-20230925074920-efc3d0c4979c

UPDATE: How did i know it failed: i tried to call a function added in the master branch of my repo, but it failed.

So how should i do?

0

There are 0 best solutions below