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

Go 的包管理问题

  •  
  •   iamundefined ·
    fatedier · Apr 25, 2018 · 2928 views
    This topic created in 3122 days ago, the information mentioned may be changed or developed.

    1、包都来自 Github,如果有一个底层包哪天没了,上面的不都编译不了吗。 2、有的包的路径来自第三方网站,网站能访问但是开启代理就 500,可是不开启代理,别的依赖就装不了。

    15 replies  •  2018-04-26 08:59:20 +08:00
    locktionc
    locktionc
    Apr 25, 2018
    1
    你可以自己创建一个 vendor 文件夹,依赖的包都放在这个里面。这样就万无一失了。
    LazyZhu
    LazyZhu
    Apr 25, 2018
    3
    @locktionc
    错了, 应该用这个官版的 https://github.com/golang/dep
    wangxiaoaer
    wangxiaoaer
    Apr 25, 2018
    4
    @LazyZhu #3 dep 还行,就是首次 init 的时候慢的让你怀疑人生。
    binjoo
    binjoo
    Apr 25, 2018
    5
    go 的包管理很是蛋疼。
    specita
    specita
    Apr 25, 2018
    6
    这就是 go 包管理蛋疼的地方了啊
    Mithrandir
    Mithrandir
    Apr 25, 2018❤️1
    7
    dep 已经要被抛弃了, 请静静等待 vgo
    sophos
    sophos
    Apr 25, 2018
    8
    vgo 了解一下,等正式版
    LazyZhu
    LazyZhu
    Apr 25, 2018
    9
    dep 还没捂热呢, 又来一个...
    vgo 不只是包管理那么简单啊...
    myu7815
    myu7815
    Apr 25, 2018
    10
    被 go 的包管理折腾不轻,目前组里用的都是 glide。虽然每次 update 很慢,但好像是比较好的选择了。墙外的包基本上在 github 上都有镜像,glide 配置文件指定下 git 仓库地址就行了。

    以前看了一眼 dep,没找到怎么管理 gitlab 上的包的方法,gitlab 上的包是需要指定 git 仓库地址的,dep 好像不支持。
    iamundefined
    iamundefined
    OP
    Apr 25, 2018
    11
    @locktionc 目前用的 dep 看在官方推 只是 dep 安装大部分不也是去 github 上下载
    iamundefined
    iamundefined
    OP
    Apr 25, 2018
    12
    @wangxiaoaer 走代理速度还好,就是有的包不再 github 上,第三方网站上的走代理直接 500,dep 就报错,直接 init 失败
    比如这个 http://www.stathat.com/c/consistent
    locktionc
    locktionc
    Apr 25, 2018
    13
    @iamundefined 和 Glide 比哪个好
    janxin
    janxin
    Apr 26, 2018 via iPad
    14
    @myu7815 支持
    orderc
    orderc
    Apr 26, 2018
    15
    @myu7815 #10 简单配置一下 git, dep 就支持从 gitlab 拉取代码了
    https://edenmal.moe/2017/06/02/Golang-go-get-from-Gitlab/
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2263 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 48ms · UTC 14:01 · PVG 22:01 · LAX 06:01 · JFK 09:01
    ♥ Do have faith in what you're doing.