I wanto to send a simple "getinfo" request to lnd using golang. I currently have
package main
import (
"fmt"
"log"
"net/rpc"
)
func main() {
client, err := rpc.Dial("tcp", "localhost:10009")
if err != nil {
log.Fatal("dialing:", err)
}
type Rep struct {
identity_pubkey string
alias string
num_pending_channels uint32
num_active_channels uint32
num_peers uint32
block_height uint32
block_hash string
synced_to_chain bool
testnet bool
chains string
uris string
best_header_timestamp int64
}
var reply Rep
args := ""
err = client.Call("getinfo", args, &reply)
if err != nil {
log.Fatal(err)
}
fmt.Println(reply)
}
but i get 2018/04/12 23:41:09 unexpected EOF