hey guys I am having an issue with pathing as it is right now this is my .zshrc
file:
export GOPATH=$HOME/go
export PATH=$PATH:$GOPATH/bin
my app main.go is just a stereotypical “hello world” with fmt
when I run the command:
$ go run src/github.com/ctfrancia/firstapp/main.go
I get the expected outcome Hello!
in terminal.
however, when running:
$ go build src/github.com/ctfrancia/firstapp
I get this error:
can’t load package: package src/github.com/ctfrancia/firstapp: cannot find package “src/github.com/ctfrancia/firstapp” in any of:
/usr/local/Cellar/go/1.12.6/libexec/src/src/github.com/ctfrancia/firstapp (from $GOROOT)
/Users/c.francia/go/src/src/github.com/ctfrancia/firstapp (from $GOPATH)
I installed go using Homebrew (as I found many recommendations in doing so if I should do it differently I’m up for recommendations) what I notice is that on the third line there is src/src/github....
but that second src
folder doesn’t exist, which might be the issue?
Thank you for any help and I look forward to learning and growing more with this language!