fabric-samples/high-throughput/application-go/functions/deletePrune.go
Mark S. Lewis 4c97d4c12b
Use Fabric Gateway client API in high-throughput (#1338)
The high-throughput sample used the deprecated Go SDK. This change
updates the sample to use the currently supported Fabric Gateway client
API and adds some automated testing to ensure the sample works
correctly.

Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
2025-07-27 14:47:22 -04:00

22 lines
490 B
Go

/*
Copyright 2020 IBM All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package functions
import (
"fmt"
"github.com/hyperledger/fabric-gateway/pkg/client"
)
// DeletePrune deletes or prunes a variable
func DeletePrune(contract *client.Contract, function, variableName string) ([]byte, error) {
result, err := contract.SubmitTransaction(function, variableName)
if err != nil {
return result, fmt.Errorf("failed to Submit transaction: %v", err)
}
return result, err
}