go get error - can't load package

后端 未结 1 1724
無奈伤痛
無奈伤痛 2021-02-15 09:44

I am new to golang and I am trying to get a package but I get a strange error and can\'t seem to figure out what the problem is?

padlar@padlar:~/workspace-go$ ec         


        
相关标签:
1条回答
  • 2021-02-15 10:18

    You are using go get on two different import paths. The new path,

    go get golang.org/x/oauth2
    

    and the old path

    go get github.com/golang/oauth2
    

    This confuses the Go tool chain. Consistently use the new import path

    go get golang.org/x/oauth2
    
    0 讨论(0)
提交回复
热议问题