// Create the token cancel airdrop transaction
transaction, err := hedera.NewTokenCancelAirdropTransaction().
AddPendingAirdropId(pendingAirdropId).
FreezeWith(client)
if err != nil {
panic(err)
}
// Sign with the sender account key and submit the transaction to the Hedera network
txResponse, err := transaction.Sign(accountKey).Execute(client)
if err != nil {
panic(err)
}
// Request the receipt of the transaction
receipt, err := txResponse.GetReceipt(client)
if err != nil {
panic(err)
}
// Get the transaction consensus status
transactionStatus := receipt.Status
fmt.Println("The transaction consensus status:", transactionStatus)
// v2.51.0