OK, I was doing everything in the ~/go directory. I assumed that 'go get’ would create the appropriate directories under go/src.
I have not followed your example yet, but I suspect that’s my problem. Thanks! Joe > On Jan 10, 2021, at 5:24 PM, Rick <thesuggestednamesareaw...@gmail.com> wrote: > > I'm not entirely following what you are doing. But here are some comments. > You have a directory $HOME/go, the contents of which look like what you would > see under $GOPATH. If you are going to create a project under $HOME/go > (whether GOPATH is defined or not), the suggested place to put it is in > $HOME/go/src/urlShortener or perhaps > $HOME/go/src/github.com/yourID/urlShortener. Having said that, using the same > version of Go I am able to do the following without error: > > unset GOPATH > cd /tmp > mkdir urlShortener > cd urlShortener > go mod init urlShortener > go get github.com/fasthttp/router > etc... > > Works for me. > On Sunday, 10 January 2021 at 16:59:55 UTC-8 joseph.p...@gmail.com wrote: > I found (what I think is) a simple GO project to play with as a learning > exercise: > > > https://intersog.com/blog/how-to-write-a-custom-url-shortener-using-golang-and-redis/ > > <https://intersog.com/blog/how-to-write-a-custom-url-shortener-using-golang-and-redis/> > > The second step fails immediately. with the aforementioned error message. > > I'm using GO version 1.15.6 > $GOPATH is undefined. > Here's the content of ~/go > Joes-iMac:go joe$ pwd > > /Users/joe/go > > Joes-iMac:go joe$ ls > > bin go.mod pkg src > > Joes-iMac:go joe$ more go.mod > > module urlShorter > > > > go 1.15 > > [eof] > > So, I googled for the error message. I find lots of hits, but no clear > explanation of why the error message, but most importantly, no clear > explanation of how to fix... > > Help please! > > Thanks, > > Joe > > > -- > 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 > <mailto:golang-nuts+unsubscr...@googlegroups.com>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/golang-nuts/f0b5be67-a41d-4953-b65a-102309a232d4n%40googlegroups.com > > <https://groups.google.com/d/msgid/golang-nuts/f0b5be67-a41d-4953-b65a-102309a232d4n%40googlegroups.com?utm_medium=email&utm_source=footer>. -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/ADAE81A4-828E-4C26-9693-6905EF80D7D3%40icloud.com.