iivri
(iivri)
November 28, 2016, 9:45pm
1
I am attempting to create a Gopath, however I am getting this annoying error
eloiim:~ iivri.andre$ echo 'echo GOPATH=$HOME' >> $HOME/.profile
eloiim:~ iivri.andre$ source $HOME/.profile
-bash: export: `=': not a valid identifier
-bash: export: `/Users/iivri.andre': not a valid identifier
GOPATH=/Users/iivri.andre
GOPATH=/Users/iivri.andre
THIS is the tutorial that I AM using.
https://howistart.org/posts/go/1#setting-up-your-environment
HOW can I correct this error?
iivri
(iivri)
November 29, 2016, 1:01am
3
@dfc SO omit the :
echo 'echo GOPATH=$HOME' >> $HOME/.profile
dfc
(Dave Cheney)
November 29, 2016, 2:10am
4
I’m not sure if you’re trying to create instructions for how someone else could configure their Go workspace, or if you are trying to modify your own environment.
I recommend editing $HOME/.profile
removing the line
echo GOPATH=$HOME
and adding the line
export GOPATH=$HOME
iivri
(iivri)
November 29, 2016, 2:37am
5
@dfc well what I am attempting is to just to create the workspace as instructed by the tutorial. I am following it to create the mock website.
dfc
(Dave Cheney)
November 29, 2016, 2:44am
6
Can you please tell me which tutorial you are using? Is it online somewhere?
@dfc , that tutorial link was in the original post (unless it was edited after the fact)
https://howistart.org/posts/go/1#setting-up-your-environment
@iivri , you seem to have misread the tutorial example. The tutorial uses the export
keyword instead of echo
If you update it to match the actual text I would think it would work.
dfc
(Dave Cheney)
November 29, 2016, 10:47am
8
Thanks for pointing that out, I didn’t see the original link. I agree with Justin, the instructions in the tutorial are correct in this respect.
1 Like
iivri
(iivri)
November 29, 2016, 1:31pm
9
@dfc @Justin_Israel Thank You 2. I realize the mistake I made. I will make the edits and see if it works.
system
(system)
Closed
February 27, 2017, 1:31pm
10
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.