V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
The Go Programming Language
http://golang.org/
Go Playground
Go Projects
Revel Web Framework
wencan

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

  •  
  •   wencan · Oct 16, 2022 · 2730 views
    This topic created in 1290 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
        1
    yougg  
       Oct 16, 2022
    go get github.com/<user>/<repo>@<commit_id>
    wangyu17455
        2
    wangyu17455  
       Oct 16, 2022
    有个不太优雅的办法,删掉本地缓存然后再 get 试试?
    LindsayZhou
        3
    LindsayZhou  
       Oct 16, 2022
    GOPROXY=direct get get xxxx
    谷歌的缓存,直连就好了。
    引申阅读: https://drewdevault.com/2022/05/25/Google-has-been-DDoSing-sourcehut.html
    mengyx
        4
    mengyx  
       Oct 16, 2022
    建议使用 Go Workspace https://go.dev/doc/tutorial/workspaces
    wencan
        5
    wencan  
    OP
       Oct 16, 2022
    @yougg @commit_id 大法好,利国利民又利家
    349865361
        6
    349865361  
       Oct 25, 2022
    go env -w GOPROXY=direct 禁用代理直接从 git 仓库获取
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3672 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 39ms · UTC 04:38 · PVG 12:38 · LAX 21:38 · JFK 00:38
    ♥ Do have faith in what you're doing.