duanmei1694 2016-01-30 13:54
浏览 108
已采纳

如何在Windows中的Sublime Text 3中设置Gosublime?

The main problem here is .. that i have installed the package control and also the gosublime plugin but it is not working also it is not working in the command promt when i type go it gives info proving that the go is installed correctly in path i am actually trying to use a seprator to set paths for go and java simultaneously which i might be doing wrong

ENVIRONMENT VARIABLE

Now in sublime text 3 i am receiving an error as

MarGo: Missing required environment variables: GOPATH | > See the Quirks section of USAGE.md for info

I went through this but it didnt help me

Sublime Text: "MarGo: Missing required environment variables: GOPATH"

  • 写回答

2条回答 默认 最新

  • duanjian3338 2016-01-30 14:19
    关注

    You have to set the GOPATH environment variable to something like d:\myprojects\go. That's where your code and libraries will be stored.

    Your code should be located in a folder like d:\myprojects\go\src\github.com\pandey\coolproject.

    Relevant section from the docs:

    [...]

    Test your installation

    Check that Go is installed correctly by setting up a workspace and building a simple program, as follows.

    Create a directory to contain your workspace, $HOME/work for example, and set the GOPATH environment variable to point to that location.

    $ export GOPATH=$HOME/work You should put the above command in your shell startup script ($HOME/.profile for example) or, if you use Windows, follow the instructions above to set the GOPATH environment variable on your system.

    Next, make the directories src/github.com/user/hello inside your workspace (if you use GitHub, substitute your user name for user), and inside the hello directory create a file named hello.go with the following contents:

    [...]

    (https://golang.org/doc/install#testing)

    See the Go docs for more details, especially on how to do it on windows: https://golang.org/doc/install

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 网络科学导论,网络控制
  • ¥15 metadata提取的PDF元数据,如何转换为一个Excel
  • ¥15 关于arduino编程toCharArray()函数的使用
  • ¥100 vc++混合CEF采用CLR方式编译报错
  • ¥15 coze 的插件输入飞书多维表格 app_token 后一直显示错误,如何解决?
  • ¥15 vite+vue3+plyr播放本地public文件夹下视频无法加载
  • ¥15 c#逐行读取txt文本,但是每一行里面数据之间空格数量不同
  • ¥50 如何openEuler 22.03上安装配置drbd
  • ¥20 ING91680C BLE5.3 芯片怎么实现串口收发数据
  • ¥15 无线连接树莓派,无法执行update,如何解决?(相关搜索:软件下载)