doucai4274 2016-11-15 21:02
浏览 75

设置环境-$ GOPATH

I have defined my $GOPATH to be $HOME/go and when using vim-go, it has installed several binaries (using :GoInstallBinaries) into that folder. Now the structure is similar to:

------ list of binaries

--------- list of other directories

--------several other directories, similar with ones below

I'm confused now where to start my own project within this structure? Say I wanted to create my own project virtual_tree, from what I understand it should be under src. But should that be inside of Where should my project go? Do I need to use pkg/ for anything? I understand that bin/ contains the executable for the project.


  • 写回答

1条回答 默认 最新

  • dsaf32131 2016-11-15 21:17
    1. You should follow the convention of $GOPATH/src/REPOSITORY_PROVIDER/USERNAME/PROJECT. So, if your virtual_tree project resides in github, then you should locate it in $GOPATH/src/

    2. The pkg directory contains the compiled packages. Within that directory a sub-directory that describes the target architecture is created and that mirrors the source directories.

    Read more on:

    本回答被题主选为最佳回答 , 对您是否有帮助呢?



  • ¥15 python+selenium,在新增时弹出了一个输入框
  • ¥15 苹果验机结果的api接口哪里有??单次调用1毛钱及以下。
  • ¥20 学生成绩管理系统设计
  • ¥15 来一个cc穿盾脚本开发者
  • ¥15 CST2023安装报错
  • ¥15 使用diffusionbert生成文字 结果是PAD和UNK怎么办
  • ¥15 有人懂怎么做大模型的客服系统吗?卡住了卡住了
  • ¥20 firefly-rk3399上启动卡住了
  • ¥15 如何删除这个虚拟音频
  • ¥50 hyper默认的default switch