If I write a piece of Hyperledger Fabric chaincode in go on local, how can I transform my chaincode from local to fabric peer ?
With the assumption that, when you say "how can I transform my chaincode from local to peer", you mean that you want to install and instantiate the chaincode on a peer. You can follow the steps provided here. If you're following the tutorial provided here, I'd suggest you create the artifacts manually and follow the steps from here. Specifically, using cli, you install a chaincode into a peer from the cli container using the following command :
peer chaincode install -n mycc -v 1.0 -p path/to/your/chaincode/
The argument to the -p
option specifies the path to the chaincode, which must be located within the source tree of the user’s GOPATH