bilibili / kratos-demo

a project that use kratos
187 stars 70 forks source link

Module path should be "github.com/bilibili/kratos-demo", not "kratos-demo" #13

Open KateGo520 opened 4 years ago

KateGo520 commented 4 years ago

Background

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 

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 :

module github.com/bilibili/kratos
go 1.13
require (
    …
) 

2) Warning the users not to use the module, get "github.com/bilibili/kratos/tool/kratos " in GOPATH mode.

KateGo520 commented 4 years ago

@XyuWang @tonyboxes Could you help me review this issue? Thx :p