A small golang package to help you use your bitcore insight API with Golang.
// import "github.com/hunterlong/insight"
bitcoin := insight.New("https://insight.bitpay.com/api")
// err := bitcoin.Ping() // test insight API connection
// bitcoin.SetThreads(16) // set multiple threads to download transactions faster
block := bitcoin.NewBlock(532833) // you can use Block Height
block := bitcoin.NewBlock("0000000000000000003221e76df18226231f8e33694f40318051ec688decd6b0") // or hash
block := bitcoin.NewBlock(nil) // or get the latest block
transactions := block.Transactions()
// transactions.ToJSON()
address := bitcoin.NewAddress("3KJrsjfg1dD6CrsTeHdHVH3KqMpvL2XWQn")
balance := address.Balance()
utxos := address.UTXO()
sync := bitcoin.Sync()
// sync.Status
// sync.BlockChainHeight