Closed xihongshi153 closed 2 years ago
已解决 替换为全路径即可 replace ( github.com/EDDYCJY/go-gin-example/conf => /root/go-application/go-gin-example/pkg/conf github.com/EDDYCJY/go-gin-example/middleware => /root/go-application/go-gin-example/middleware github.com/EDDYCJY/go-gin-example/models => /root/go-application/go-gin-example/models github.com/EDDYCJY/go-gin-example/pkg/setting => /root/go-application/go-gin-example/pkg/setting github.com/EDDYCJY/go-gin-example/routers => /root/go-application/go-gin-example/routers )
感谢,我也遇到了这个问题
[root@ecs-350208 go-gin-example]# go get -u github.com/go-ini/ini go: errors parsing go.mod: /root/go/gopath/src/go-gin-example/go.mod:26:3: replacement module without version must be directory path (rooted or starting with ./ or ../) /root/go/gopath/src/go-gin-example/go.mod:27:3: replacement module without version must be directory path (rooted or starting with ./ or ../) /root/go/gopath/src/go-gin-example/go.mod:28:3: replacement module without version must be directory path (rooted or starting with ./ or ../) /root/go/gopath/src/go-gin-example/go.mod:29:3: replacement module without version must be directory path (rooted or starting with ./ or ../) /root/go/gopath/src/go-gin-example/go.mod:30:3: replacement module without version must be directory path (rooted or starting with ./ or ../)