Module path is inconsistent with go import path.
GO111MODULE=on, run go get -u github.com/bilibili/kratos/tool/kratos:
go: downloading github.com/bilibili/kratos v0.5.0
go: found github.com/bilibili/kratos/tool/kratos in github.com/bilibili/kratos v0.5.0
go get: github.com/bilibili/kratos@v0.5.0: parsing go.mod:
module declares its path as: github.com/go-kratos/kratos
but was required as: github.com/bilibili/kratos
Background
Module path is inconsistent with go import path. GO111MODULE=on, run
go get -u github.com/bilibili/kratos/tool/kratos
:Solution
Fix the module path:
1) Rename the module path to "github.com/bilibili/kratos": https://github.com/bilibili/kratos-demo/blob/master/go.mod#L1 :
2) Warning the users not to use the module, get "github.com/bilibili/kratos/tool/kratos " in GOPATH mode.