package main
import (
"log"
"github.com/stellar/go/clients/horizonclient"
"github.com/stellar/go/keypair"
)
//unfunded seed on testnet
var stellar_seed = "SANIUNNZFTU7LNMYXMWL25SAYEQE7GI2JLBG2DMSMA3DLNEBOPH7HAMI"
func main() {
// Make a keypair for a known account from a secret seed
kp, _ := keypair.Parse(stellar_seed)
// Get the current state of the account from the network
client := horizonclient.DefaultTestNetClient
ar := horizonclient.AccountRequest{AccountID: kp.Address()}
sourceAccount, err := client.AccountDetail(ar)
if err != nil {
// log.Println(horizon.Error.Problem)
log.Fatalln(err)
}
log.Println(sourceAccount)
}
Running this, I get the message:
2022/02/25 23:41:29 horizon error: "Resource Missing" - check horizon.Error.Problem for more information
exit status 1
How do I "check horizon.Error.Problem"?