문제

I've been trying various configurations in order to call a simple JSON-RPC server for Bitcoin in Go, but didn't manage to get anywhere.

In Python, the entire code looks like:

from jsonrpc import ServiceProxy
access = ServiceProxy("http://user:pass@127.0.0.1:8332")
print access.getinfo()

But in Go, I seem to be bumping into erros like "too many colons in address", or "no such host". I've tried using both of the packages rpc and rpc/jsonrpc, using methods Dial and DialHTTP, using various network parameters and still can't get anywhere.

So, how do I properly call a JSON-RPC server in Go?

올바른 솔루션이 없습니다

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top