title: How to properly call JSON-RPC in Go?
body: <p>I've been trying various configurations in order to call <a href="https://en.bitcoin.it/wiki/Elis-API#Example_Request" rel="nofollow noreferrer">a simple JSON-RPC server for Bitcoin</a> in Go, but didn't manage to get anywhere.</p>
  
  <p>In Python, the entire code looks like:</p>
  
  <pre><code>from jsonrpc import ServiceProxy
  access = ServiceProxy("http://user:pass@127.0.0.1:8332")
  print access.getinfo()
  </code></pre>
  
  <p>But in Go, I seem to be bumping into erros like <a href="https://stackoverflow.com/questions/8854682/go-json-rpc-too-many-colons">"too many colons in address"</a>, 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.</p>
  
  <p>So, how do I properly call a JSON-RPC server in Go?</p>