duanmei1694 2014-02-18 18:41
浏览 45

Golang-如何在没有互联网的应用程序中实现Go Get?

I am certainly a GO newbie so I will apologize in advance. I am playing around with a GO app that imports martini for example. Every time I run the app, I have to run "go get github.com/codegangsta/martini". Any way to NOT have to do this? Either way, how would this work in an offline environment? I am considering GO for an app that will be offline with no internet access.

  • 写回答

1条回答 默认 最新

  • douding6266 2014-02-18 19:05
    关注

    From the go documentation:

    Get downloads and installs the packages named by the import paths, along with their dependencies.

    To expand on that: go get will clone the code you're requesting from the repository (in this case github.com/codegangsta/martini) as well as any code that that code imports and store it in your local $GOPATH/src/ directory then build it and store it so that is available to call via import, so you should never have to call go get more than once unless your GOPATH is being changed and it should always be available locally after the initial go get.

    评论

报告相同问题?

悬赏问题

  • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line
  • ¥500 火焰左右视图、视差(基于双目相机)
  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?