The Go Programming Language
› http://golang.org/
› Go Playground
Go Projects
› Revel Web Framework
wencan

github 上 go 库更新后,本地 go get 有巨大延迟,怎么解决?

  •  
  •   wencan · Oct 16, 2022 · 3173 views
    This topic created in 1483 days ago, the information mentioned may be changed or developed.
    在开发两个库,都在 github 上,一个依赖于另一个。
    被依赖的库更新快半小时了,github 网页上也早看到了更新,本地 go get -u -v 还是什么都没有
    6 replies  •  2022-10-25 11:39:32 +08:00
    yougg
    yougg
    Oct 16, 2022
    1
    go get github.com/<user>/<repo>@<commit_id>
    wangyu17455
    wangyu17455
    Oct 16, 2022
    2
    有个不太优雅的办法,删掉本地缓存然后再 get 试试?
    LindsayZhou
    LindsayZhou
    Oct 16, 2022
    3
    GOPROXY=direct get get xxxx
    谷歌的缓存,直连就好了。
    引申阅读: https://drewdevault.com/2022/05/25/Google-has-been-DDoSing-sourcehut.html
    mengyx
    mengyx
    Oct 16, 2022
    4
    建议使用 Go Workspace https://go.dev/doc/tutorial/workspaces
    wencan
    wencan
    OP
    Oct 16, 2022
    5
    @yougg @commit_id 大法好,利国利民又利家
    349865361
    349865361
    Oct 25, 2022
    6
    go env -w GOPROXY=direct 禁用代理直接从 git 仓库获取
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   675 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 21:17 · PVG 05:17 · LAX 13:17 · JFK 16:17
    ♥ Do have faith in what you're doing.