Fabric chaincode requires separate folders for each chaincode for deployment. for e.g., chaincode_1 will need to be in chaincode_1 folder with all the dependencies (vendor), util/library functions + chaincode_1.go and same for chaincode_2.
My question is how to organize util/library folder if it has functions that i want to use it across chaincodes. Fabric chaincode deployment does not allow it.. i think. And the util folder is replicated/redundant in each chaincode folder
You could put all of your shared dependencies, including your own util package, in a separate repository and then vendor them via dep. They would still be replicated per chaincode, but it might be easier to manage them via dep ensure rather than having to manually copy them.