I installed golang on Debian Jessie (Package golang) and tried to run the server demo,
using this command as described in the docs:
$ cd demo/server
$ ./server
It is not interpreted as go:
./server.go: line 1: //: Is a directory
./server.go: line 2: //: Is a directory
./server.go: line 3: //: Is a directory
[...]
The problem can be fixed by prepending a shebang for go to the go files
(from http://stackoverflow.com/questions/7707178/whats-the-appropriate-go-shebang-line):
//usr/bin/go run $0 $@ ; exit
[...]
chmod +x may be needed, too to make it executable:
$ chmod +x ./demo/server/server.go
$ chmod +x ./demo/wsclient/wsclient.go
Also some go packages have to be installed before the demos can be tried,
this may be useful being documented, too:
(enter the ./demo directory first)
$ export GOPATH=$(pwd)
# for the server or wsclient demo
$ go get golang.org/x/net/websocket
$ mkdir -p src/github.com/eBay/fabio/_third_party
$ mv src/golang.org/ src/github.com/eBay/fabio/_third_party/
# specifically for the server demo
$ go get github.com/hashicorp/go-cleanhttp
$ go get github.com/hashicorp/consul
$ go get github.com/hashicorp/consul/api
$ mkdir -p src/github.com/eBay/fabio/_third_party/github.com
$ mv src/github.com/hashicorp/consul/ src/github.com/eBay/fabio/_third_party/github.com/hashicorp/
I installed golang on Debian Jessie (Package golang) and tried to run the server demo,
using this command as described in the docs:
It is not interpreted as go:
The problem can be fixed by prepending a shebang for go to the go files
(from http://stackoverflow.com/questions/7707178/whats-the-appropriate-go-shebang-line):
chmod +x may be needed, too to make it executable:
Also some go packages have to be installed before the demos can be tried,
this may be useful being documented, too: