Skip to content

Latest commit

 

History

History
28 lines (21 loc) · 522 Bytes

README.md

File metadata and controls

28 lines (21 loc) · 522 Bytes

gocode

Some libraries in GO

hello

$ go run cmd/hello/main.go
HelloService.Say executed with args: Bob
Hello Bob

hello-server

$ go run cmd/hello-server/main.go 
Starting server...
Listen on port 9000
$ curl  -H "Content-Type: application/json"  -d '{"jsonrpc": "2.0", "method": "HelloService.Say", "params": [{"Name":"Bob"}], "id": 1}' http://localhost:9000/rpc
{"result":{"Message":"Hello Bob"},"error":null,"id":1}
HelloService.Say executed with args: Bob