Hi,

you were very close, instead of

go install github.com/mortalcatalyst/xml/xml.go

do

go install github.com/mortalcatalyst/xml


In go, you don't install the particular file, you install the program as a 
whole (which in many cases, it involves more than one file)

And as a side note, normally you would 

$ cd $GOPATH/src/github.com/mortalcatalyst/xml
$ go install


so you don't have to specify the whole path to the project every time.

Hope that helps

P.S. as you work with Go more and more, you'll want to add these lines to 
~/.bash_profile:

CDPATH=.:$GOPATH/src/github.com:$GOPATH/src/bitbucket.org #you may add more 
domains here if you host your proejct(s) somewhere else
export CDPATH

that let's you, form anywhere in your terminal, to type:

$ cd mor 

Then press tab and the terminal will autocomplete mortalcatalyst

P.S. source of the 
tip https://twitter.com/rob_pike/status/467367507305574400

Diego





On Saturday, February 11, 2017 at 7:12:38 AM UTC-5, Sayth Renshaw wrote:
>
> Hi All
>
> I installed go on a new linux mint laptop and followed the standard go 
> guide and it works fine with the hello world example.
>
> Today i came back to work on go and cannot seem to do the install step to 
> run my script.
>
> sayth@sayth-E6410 ~ $ mkdir -p work/src/github.com/mortalcatalyst/xml
> sayth@sayth-E6410 ~ $ code ~/work/src/github.com/mortalcatalyst/xml/xml.go
> sayth@sayth-E6410 ~ $ go install github.com/mortalcatalyst/xml/xml.go
> stat github.com/mortalcatalyst/xml/xml.go: no such file or directory
>
> sayth@sayth-E6410 ~ $ cd $GOPATH    
> sayth@sayth-E6410 ~/work $ go install github.com/mortalcatalyst/xml/xml.go
> stat github.com/mortalcatalyst/xml/xml.go: no such file or directory
>
> Now I am a little confused, how should I easily come in every day fire up 
> a project and get it to work and get the file to run and install?
>
> Cheers
>
> Sayth
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to