BuzzDenver (4) [Avatar] Offline
#1
I cloned the github repo and trying to run the example. I get:

balazs@miles:~/src/goinaction-code/chapter2/sample$ go run main.go
main.go:7:2: cannot find package "github.com/goinaction/code/chapter2/sample/matchers" in any of:
/usr/lib/go/src/github.com/goinaction/code/chapter2/sample/matchers (from $GOROOT)
($GOPATH not set)
main.go:8:2: cannot find package "github.com/goinaction/code/chapter2/sample/search" in any of:
/usr/lib/go/src/github.com/goinaction/code/chapter2/sample/search (from $GOROOT)
($GOPATH not set)
balazs@miles:~/src/goinaction-code/chapter2/sample$ go version
go version go1.5.1 linux/amd64


Is it a version incompatibility ?
Bill Kennedy (68) [Avatar] Offline
#2
That URL does not look right?

https://github.com/goinaction/code

The code is here and therefore on disk it needs to be loaded here

$GOPATH/src/github.com/goinaction/code

Can you please check this is setup. If you need help send me an email bill@ardanlabs.com
BuzzDenver (4) [Avatar] Offline
#3
Thanks Bill. I was under the mistaken impression that those modules somehow get loaded over the net and maybe cached locally. All good now.
431502 (1) [Avatar] Offline
#4
I am also having problems getting the sample code to work.
C:/Go\bin\go.exe run C:/Go/workspace/src/github.com/goinaction/code/chapter2/sample/main.go
2016/12/02 15:04:37 Register default matcher
2016/12/02 15:04:37 open data/data.json: The system cannot find the path specified.
2016/12/02 15:04:37 Register rss matcher
exit status 1 


This is the error i am getting, i have everything setup in %GOPATH%/src/github.com/goinaction/code
I'm running the main.go in chapter 2 example.
robert.panzer (3) [Avatar] Offline
#5
Hm... requiring the user to download the code to some random position looks like an example of how to not do it.
It would have been nice to have the instructions in the book in particular as the example comprehends many different aspects and could invite the user to play with it.