From d493f6a5ccec8abcdda6d759b2d1c0e813f6429c Mon Sep 17 00:00:00 2001 From: Pritam Singh Date: Wed, 8 Apr 2020 16:14:39 +0530 Subject: [PATCH] resolved the issue Signed-off-by: Pritam Singh --- chaincode/abstore/go/abstore.go | 8 ++++---- chaincode/abstore/go/go.mod | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/chaincode/abstore/go/abstore.go b/chaincode/abstore/go/abstore.go index ac0e2119..9b35a22f 100644 --- a/chaincode/abstore/go/abstore.go +++ b/chaincode/abstore/go/abstore.go @@ -121,15 +121,15 @@ func (t *ABstore) Query(ctx contractapi.TransactionContextInterface, A string) ( jsonResp := "{\"Name\":\"" + A + "\",\"Amount\":\"" + string(Avalbytes) + "\"}" fmt.Printf("Query Response:%s\n", jsonResp) - return jsonResp, nil + return string(Avalbytes), nil } func main() { - cc,err:=contractapi.NewChaincode(new(ABstore)) - if err!=nil{ + cc, err := contractapi.NewChaincode(new(ABstore)) + if err != nil { panic(err.Error()) } if err := cc.Start(); err != nil { fmt.Printf("Error starting ABstore chaincode: %s", err) - } + } } diff --git a/chaincode/abstore/go/go.mod b/chaincode/abstore/go/go.mod index ecb10d14..7a4f7a74 100644 --- a/chaincode/abstore/go/go.mod +++ b/chaincode/abstore/go/go.mod @@ -1,5 +1,5 @@ -module github.com/Zzocker/fabric-samples/chaincode/abstore/go +module github.com/hyperledger/fabric-samples/chaincode/abstore/go -go 1.14 +go 1.13 require github.com/hyperledger/fabric-contract-api-go v1.0.0