天天看點

VSCode 下載下傳Models 報錯

 VSCode調試部分代碼時,報錯,提示不能自動擷取Models。報錯資訊如下。

go: golang.org/x/[email protected]: unrecognized import path "golang.org/x/crypto" (https fetch: Get https://golang.org/x/crypto?go-get=1: dial tcp 216.239.37.1:443: 
connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.)      
VSCode 下載下傳Models 報錯

其中的一個解決方案如下:

step 1 進入go 預設安裝路徑下的src檔案;

step 2 點選Git Bash Here

VSCode 下載下傳Models 報錯

step 3 登入網址 https://github.com/golang 去找  crypto 包的githum 位址

VSCode 下載下傳Models 報錯

Step 4  通過git clone 指令下載下傳

git clone https://github.com/golang/crypto.git golang.org/x/crypto      

 step 5 下載下傳成功

VSCode 下載下傳Models 報錯

VSCode 再次打開,不再報錯。

繼續閱讀