Deploy and invoke the chain code
Here is out main method which will be starting the chaincode when we deploy it to fabric runtime on peer nodes
main.go
func main() {
voteContract := new(vote.VoteContract)
chaincode, err := contractapi.NewChaincode(voteContract)
if err != nil {
panic(err)
}
err = chaincode.Start()
if err != nil {
panic(err.Error())
}
}