我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

$ GOPATH值在终端的新会话期间保持重置为空

I have installed GO on my Mac Book using the 10.8+ installer from golang.org, and I have set up a workspace. After running both these commands: export GOPATH=$HOME/go and export PATH=$PATH:$GOPATH/bin, echoing the GOPATH does return a value of /Users/dipen/go; however, after restarting the terminal, the echoing the GOPATH returns nothing. How can I fix this?

Add these lines to your ~/.bashrc or ~/.bash_profile:

export GOPATH=$HOME/go
export PATH=$PATH:$GOPATH/bin

近期文章

  • 在Go中存储状态
  • 使用数组作为函数调用参数
  • Google Appengine,运行繁重的数据存储区的最便宜的方式来编写cron作业?
  • 去模板扩展和超级?
  • 如何在Go中表示实体之间的关系?
  • Go语言:“运行”时更改构建文件夹
  • 使用反射来设置结构值的结构值
  • 找到包但找不到内容?
  • Google App Engine:Go中的一对多关系
  • 如何在AWS(类似于Openshift的DIY)上部署自己的服务器(用Java编写)?
  • 去通道容量,为什么要比我指定的多一个元素
  • 使用反射设置指向字段的指针
  • 如何在切片中连接多个管道命令
  • 从另一个站点获取JSON并转换为数组或csv
  • GAE Go-如何将私有变量放入数据存储区?
  • 无法在Go中安装docker pkg依赖项
  • Golang template.ParseFiles“不是目录”错误
  • 从go程序中的其他文件访问对象
  • 将地图初始化为Go结构中的字段
  • Golang RSS XML解析<atom10:link覆盖<link>

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华