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 个回答

    网络不通的情况下的做法:

    第一种是去github下载包把text放golang.org/x/下面

    第二种是使用包管理工具glide: https://github.com/Mastermind...,改下仓库地址

    glide.yaml

    package: test
    import:
    - package: golang.org/x/text
      repo: https://github.com/golang/text
      version: 5cec4b58c438bd98288aeb248bab2c1840713d21