coopernurse / barrister-go

Barrister RPC bindings for the Go language
http://barrister.bitmechanic.com/
8 stars 4 forks source link

The example/ folder won't compile #5

Closed colega closed 6 years ago

colega commented 6 years ago

main() is defined several times in that package, as well as CalculatorImpl. It looks like it's intended to be a documentation package, but as files are have .go extension, you can't run go test ./... in the root of the repository.

Related to #4

coopernurse commented 6 years ago

I agree that go test ./... doesn't work, but the code in the example dir compiles and runs for me. It's not a package, so it's perfectly fine to have multiple .go files with main functions. The steps in the README appear to still work:

[james@robotron barrister-go]$ cd example/
[james@robotron example]$ go run server.go &
[1] 11419
Starting Calculator server on localhost:9233
[james@robotron example]$ go run client.go
LogFilter: PreInvoke of method: Calculator.add
LogFilter: PostInvoke of method: Calculator.add
Success!  51+22.3 = 73.3