go语言go get出错

go语言go get出错:

D:\workspace\www\go_work\src
λ go get -u github.com/swaggo/gin-swagger
package golang.org/x/text/secure/bidirule: golang.org/x/text is a custom import path for https://go.googlesource.com/text, but D:\workspace\www\go_work\src\golang.org\x\text is checked out from https://github.com/golang/text.git
package golang.org/x/text/unicode/bidi: golang.org/x/text is a custom import path for https://go.googlesource.com/text, but D:\workspace\www\go_work\src\golang.org\x\text is checked out from https://github.com/golang/text.git
package golang.org/x/text/unicode/norm: golang.org/x/text is a custom import path for https://go.googlesource.com/text, but D:\workspace\www\go_work\src\golang.org\x\text is checked out from https://github.com/golang/text.git
package golang.org/x/text/width: golang.org/x/text is a custom import path for https://go.googlesource.com/text, but D:\workspace\www\go_work\src\golang.org\x\text is checked out from https://github.com/golang/text.git

应该怎么做才可以?

阅读 1.9k
评论
    4 个回答
    • 165

    推荐去github上把相应的包clone下来:
    举例

    1. mkdir $GOPATH/src/golang.org/x
    2. cd $GOPATH/src/golang.org/x && git clone git@github.com:golang/text.git