diff --git a/client/accounts.go b/client/accounts.go index 11f8262..cff3e51 100644 --- a/client/accounts.go +++ b/client/accounts.go @@ -28,7 +28,7 @@ func (c *Client) AccountAddresses( if resp.StatusCode != http.StatusOK { return nil, fmt.Errorf("unexpected error: %d", resp.Body) } - defer resp.Body.Close() + defer resp.Body.Close() //nolint:errcheck var accountAddresses models.AccountAddresses err = json.NewDecoder(resp.Body).Decode(&accountAddresses) if err != nil { @@ -56,7 +56,7 @@ func (c *Client) AccountAssets( if resp.StatusCode != http.StatusOK { return nil, fmt.Errorf("unexpected error: %d", resp.Body) } - defer resp.Body.Close() + defer resp.Body.Close() //nolint:errcheck var accountAssets models.AccountAssets err = json.NewDecoder(resp.Body).Decode(&accountAssets) if err != nil { @@ -84,7 +84,7 @@ func (c *Client) StakeAccountHistory( if resp.StatusCode != http.StatusOK { return nil, fmt.Errorf("unexpected error: %d", resp.Body) } - defer resp.Body.Close() + defer resp.Body.Close() //nolint:errcheck var stakeAccountHistory models.StakeAccountHistory err = json.NewDecoder(resp.Body).Decode(&stakeAccountHistory) if err != nil { @@ -108,7 +108,7 @@ func (c *Client) StakeAccountInformation( return nil, fmt.Errorf("unexpected error: %d", resp.Body) } - defer resp.Body.Close() + defer resp.Body.Close() //nolint:errcheck var stakeAccountInformation models.StakeAccountInformation err = json.NewDecoder(resp.Body).Decode(&stakeAccountInformation) if err != nil { @@ -136,7 +136,7 @@ func (c *Client) StakeAccountRewards( if resp.StatusCode != http.StatusOK { return nil, fmt.Errorf("unexpected error: %d", resp.Body) } - defer resp.Body.Close() + defer resp.Body.Close() //nolint:errcheck var stakeAccountRewards models.StakeAccountRewards err = json.NewDecoder(resp.Body).Decode(&stakeAccountRewards) if err != nil { @@ -164,7 +164,7 @@ func (c *Client) StakeAccountUpdates( if resp.StatusCode != http.StatusOK { return nil, fmt.Errorf("unexpected error: %d", resp.Body) } - defer resp.Body.Close() + defer resp.Body.Close() //nolint:errcheck var stakeAccountUpdates models.StakeAccountUpdates err = json.NewDecoder(resp.Body).Decode(&stakeAccountUpdates) if err != nil { diff --git a/client/addresses.go b/client/addresses.go index 314c3b2..13ac0a6 100644 --- a/client/addresses.go +++ b/client/addresses.go @@ -21,7 +21,7 @@ func (c *Client) DecodeAddress(address string) (*models.DecodedAddress, error) { if resp.StatusCode != http.StatusOK { return nil, fmt.Errorf("unexpected error: %d", resp.Body) } - defer resp.Body.Close() + defer resp.Body.Close() //nolint:errcheck var decodedAddress models.DecodedAddress err = json.NewDecoder(resp.Body).Decode(&decodedAddress) if err != nil { @@ -42,7 +42,7 @@ func (c *Client) AddressTransactionCount(address string) (*models.AddressTransac if resp.StatusCode != http.StatusOK { return nil, fmt.Errorf("unexpected error: %d", resp.Body) } - defer resp.Body.Close() + defer resp.Body.Close() //nolint:errcheck var addressTransactionCount models.AddressTransactionCount err = json.NewDecoder(resp.Body).Decode(&addressTransactionCount) if err != nil { @@ -70,7 +70,7 @@ func (c *Client) AddressTransactions( if resp.StatusCode != http.StatusOK { return nil, fmt.Errorf("unexpected error: %d", resp.Body) } - defer resp.Body.Close() + defer resp.Body.Close() //nolint:errcheck var addressTransactions models.AddressTransactions err = json.NewDecoder(resp.Body).Decode(&addressTransactions) if err != nil { @@ -98,7 +98,7 @@ func (c *Client) PaymentCredentialTransactions( if resp.StatusCode != http.StatusOK { return nil, fmt.Errorf("unexpected error: %d", resp.Body) } - defer resp.Body.Close() + defer resp.Body.Close() //nolint:errcheck var addressTransactions models.AddressTransactions err = json.NewDecoder(resp.Body).Decode(&addressTransactions) if err != nil { @@ -126,7 +126,7 @@ func (c *Client) UtxoReferencesAtAddress( if resp.StatusCode != http.StatusOK { return nil, fmt.Errorf("unexpected error: %d", resp.Body) } - defer resp.Body.Close() + defer resp.Body.Close() //nolint:errcheck var utxoReferencesAtAddress models.UtxoReferencesAtAddress err = json.NewDecoder(resp.Body).Decode(&utxoReferencesAtAddress) if err != nil { @@ -154,7 +154,7 @@ func (c *Client) UtxosAtAddress( if resp.StatusCode != http.StatusOK { return nil, fmt.Errorf("unexpected error: %d", resp.Body) } - defer resp.Body.Close() + defer resp.Body.Close() //nolint:errcheck var utxosAtAddress models.UtxosAtAddress err = json.NewDecoder(resp.Body).Decode(&utxosAtAddress) if err != nil { @@ -183,7 +183,7 @@ func (c *Client) UtxosAtAddresses( if resp.StatusCode != http.StatusOK { return nil, fmt.Errorf("unexpected error: %d", resp.Body) } - defer resp.Body.Close() + defer resp.Body.Close() //nolint:errcheck var utxosAtAddress models.UtxosAtAddress err = json.NewDecoder(resp.Body).Decode(&utxosAtAddress) if err != nil { @@ -211,7 +211,7 @@ func (c *Client) UtxosByPaymentCredential( if resp.StatusCode != http.StatusOK { return nil, fmt.Errorf("unexpected error: %d", resp.Body) } - defer resp.Body.Close() + defer resp.Body.Close() //nolint:errcheck var utxosAtAddress models.UtxosAtAddress err = json.NewDecoder(resp.Body).Decode(&utxosAtAddress) if err != nil { diff --git a/client/asset.go b/client/asset.go index 9413977..126bf8e 100644 --- a/client/asset.go +++ b/client/asset.go @@ -28,7 +28,7 @@ func (c *Client) AccountsHoldingAsset( if resp.StatusCode != http.StatusOK { return nil, fmt.Errorf("unexpected error: %d", resp.Body) } - defer resp.Body.Close() + defer resp.Body.Close() //nolint:errcheck var accountsHoldingAsset models.AccountsHoldingAsset err = json.NewDecoder(resp.Body).Decode(&accountsHoldingAsset) if err != nil { @@ -56,7 +56,7 @@ func (c *Client) AddressHoldingAsset( if resp.StatusCode != http.StatusOK { return nil, fmt.Errorf("unexpected error: %d", resp.Body) } - defer resp.Body.Close() + defer resp.Body.Close() //nolint:errcheck var addressesHoldingAsset models.AddressesHoldingAsset err = json.NewDecoder(resp.Body).Decode(&addressesHoldingAsset) if err != nil { @@ -77,7 +77,7 @@ func (c *Client) Asset(assetId string) (*models.AssetInformations, error) { if resp.StatusCode != http.StatusOK { return nil, fmt.Errorf("unexpected error: %d", resp.Body) } - defer resp.Body.Close() + defer resp.Body.Close() //nolint:errcheck var assetInformation models.AssetInformations err = json.NewDecoder(resp.Body).Decode(&assetInformation) if err != nil { @@ -105,7 +105,7 @@ func (c *Client) AssetTransactions( if resp.StatusCode != http.StatusOK { return nil, fmt.Errorf("unexpected error: %d", resp.Body) } - defer resp.Body.Close() + defer resp.Body.Close() //nolint:errcheck var assetTransactions models.AssetTransactions err = json.NewDecoder(resp.Body).Decode(&assetTransactions) if err != nil { @@ -133,7 +133,7 @@ func (c *Client) AssetUpdates( if resp.StatusCode != http.StatusOK { return nil, fmt.Errorf("unexpected error: %d", resp.Body) } - defer resp.Body.Close() + defer resp.Body.Close() //nolint:errcheck var assetUpdates models.AssetUpdates err = json.NewDecoder(resp.Body).Decode(&assetUpdates) if err != nil { @@ -159,7 +159,7 @@ func (c *Client) AssetUtxos(assetId string, params *utils.Parameters) (*models.A if resp.StatusCode != http.StatusOK { return nil, fmt.Errorf("unexpected error: %d", resp.Body) } - defer resp.Body.Close() + defer resp.Body.Close() //nolint:errcheck var assetUtxos models.AssetUtxos err = json.NewDecoder(resp.Body).Decode(&assetUtxos) if err != nil { diff --git a/client/asset_policy.go b/client/asset_policy.go index 3f81005..fe82e0c 100644 --- a/client/asset_policy.go +++ b/client/asset_policy.go @@ -28,7 +28,7 @@ func (c *Client) AccountsHoldingPolicy( if resp.StatusCode != http.StatusOK { return nil, fmt.Errorf("unexpected error: %d", resp.Body) } - defer resp.Body.Close() + defer resp.Body.Close() //nolint:errcheck var response models.AccountsHoldingPolicy err = json.NewDecoder(resp.Body).Decode(&response) if err != nil { @@ -56,7 +56,7 @@ func (c *Client) AddressesHoldingPolicy( if resp.StatusCode != http.StatusOK { return nil, fmt.Errorf("unexpected error: %d", resp.Body) } - defer resp.Body.Close() + defer resp.Body.Close() //nolint:errcheck var response models.AddressesHoldingPolicy err = json.NewDecoder(resp.Body).Decode(&response) if err != nil { @@ -84,7 +84,7 @@ func (c *Client) SpecificPolicyInformations( if resp.StatusCode != http.StatusOK { return nil, fmt.Errorf("unexpected error: %d", resp.Body) } - defer resp.Body.Close() + defer resp.Body.Close() //nolint:errcheck var response models.PolicyInformation err = json.NewDecoder(resp.Body).Decode(&response) if err != nil { @@ -112,7 +112,7 @@ func (c *Client) TransactionsMovingPolicy( if resp.StatusCode != http.StatusOK { return nil, fmt.Errorf("unexpected error: %d", resp.Body) } - defer resp.Body.Close() + defer resp.Body.Close() //nolint:errcheck var response models.PolicyTransactions err = json.NewDecoder(resp.Body).Decode(&response) if err != nil { @@ -140,7 +140,7 @@ func (c *Client) UtxosContainingPolicy( if resp.StatusCode != http.StatusOK { return nil, fmt.Errorf("unexpected error: %d", resp.Body) } - defer resp.Body.Close() + defer resp.Body.Close() //nolint:errcheck var response models.UtxosContainingPolicy err = json.NewDecoder(resp.Body).Decode(&response) if err != nil { diff --git a/client/client.go b/client/client.go index 4b5a535..5b11a29 100644 --- a/client/client.go +++ b/client/client.go @@ -77,7 +77,7 @@ func (c *Client) sendRequest(req *http.Request, responseBody *string) error { if err != nil { return fmt.Errorf("failed to read body: %s", err) } - defer resp.Body.Close() + defer resp.Body.Close() //nolint:errcheck *responseBody = string(respBodyBytes) diff --git a/client/datum.go b/client/datum.go index 633da66..066de41 100644 --- a/client/datum.go +++ b/client/datum.go @@ -20,7 +20,7 @@ func (c *Client) DatumFromHash(hash string) (*models.DatumFromHash, error) { if resp.StatusCode != http.StatusOK { return nil, fmt.Errorf("unexpected error: %d", resp.Body) } - defer resp.Body.Close() + defer resp.Body.Close() //nolint:errcheck var datum models.DatumFromHash err = json.NewDecoder(resp.Body).Decode(&datum) if err != nil { diff --git a/client/ecosystem.go b/client/ecosystem.go index c78723f..729b6c4 100644 --- a/client/ecosystem.go +++ b/client/ecosystem.go @@ -20,7 +20,7 @@ func (c *Client) ResolveAdaHandle(handle string) (*models.BasicResponse, error) if resp.StatusCode != http.StatusOK { return nil, fmt.Errorf("unexpected error: %d", resp.Body) } - defer resp.Body.Close() + defer resp.Body.Close() //nolint:errcheck var adaHandle models.BasicResponse err = json.NewDecoder(resp.Body).Decode(&adaHandle) if err != nil { diff --git a/client/epochs.go b/client/epochs.go index eea4ff0..588a73b 100644 --- a/client/epochs.go +++ b/client/epochs.go @@ -20,7 +20,7 @@ func (c *Client) CurrentEpoch() (*models.EpochResp, error) { if resp.StatusCode != http.StatusOK { return nil, fmt.Errorf("unexpected error: %d", resp.Body) } - defer resp.Body.Close() + defer resp.Body.Close() //nolint:errcheck var currentEpoch models.EpochResp err = json.NewDecoder(resp.Body).Decode(¤tEpoch) if err != nil { @@ -41,7 +41,7 @@ func (c *Client) SpecificEpoch(epochNo int) (*models.EpochResp, error) { if resp.StatusCode != http.StatusOK { return nil, fmt.Errorf("unexpected error: %d", resp.Body) } - defer resp.Body.Close() + defer resp.Body.Close() //nolint:errcheck var specificEpoch models.EpochResp err = json.NewDecoder(resp.Body).Decode(&specificEpoch) if err != nil { diff --git a/client/general.go b/client/general.go index f0d493e..baec14f 100644 --- a/client/general.go +++ b/client/general.go @@ -20,7 +20,7 @@ func (c *Client) ChainTip() (*models.ChainTip, error) { if resp.StatusCode != http.StatusOK { return nil, fmt.Errorf("unexpected error: %d", resp.Body) } - defer resp.Body.Close() + defer resp.Body.Close() //nolint:errcheck var chainTip models.ChainTip err = json.NewDecoder(resp.Body).Decode(&chainTip) if err != nil { @@ -41,7 +41,7 @@ func (c *Client) EraSummaries() (*models.EraSummaries, error) { if resp.StatusCode != http.StatusOK { return nil, fmt.Errorf("unexpected error: %d", resp.Body) } - defer resp.Body.Close() + defer resp.Body.Close() //nolint:errcheck var eraSummaries models.EraSummaries err = json.NewDecoder(resp.Body).Decode(&eraSummaries) if err != nil { @@ -62,7 +62,7 @@ func (c *Client) ProtocolParameters() (*models.ProtocolParameters, error) { if resp.StatusCode != http.StatusOK { return nil, fmt.Errorf("unexpected error: %d", resp.Body) } - defer resp.Body.Close() + defer resp.Body.Close() //nolint:errcheck var protocolParameters models.ProtocolParameters err = json.NewDecoder(resp.Body).Decode(&protocolParameters) if err != nil { @@ -83,7 +83,7 @@ func (c *Client) BlockChainStartTime() (models.BasicResponse, error) { if resp.StatusCode != http.StatusOK { return models.BasicResponse{}, fmt.Errorf("unexpected error: %d", resp.Body) } - defer resp.Body.Close() + defer resp.Body.Close() //nolint:errcheck var blockchainStartTime models.BasicResponse err = json.NewDecoder(resp.Body).Decode(&blockchainStartTime) if err != nil { diff --git a/client/linear_vesting.go b/client/linear_vesting.go index 5b54c31..8873658 100644 --- a/client/linear_vesting.go +++ b/client/linear_vesting.go @@ -34,7 +34,7 @@ func (c *Client) LockAssets(lockBody LockBody) (*models.LockTransaction, error) if resp.StatusCode != http.StatusOK { return nil, fmt.Errorf("unexpected error: %d", resp.Body) } - defer resp.Body.Close() + defer resp.Body.Close() //nolint:errcheck var lockTransaction models.LockTransaction err = json.NewDecoder(resp.Body).Decode(&lockTransaction) if err != nil { @@ -55,7 +55,7 @@ func (c *Client) StateOfVestingAssets(beneficiary string) (*[]models.VestingStat if resp.StatusCode != http.StatusOK { return nil, fmt.Errorf("unexpected error: %d", resp.Body) } - defer resp.Body.Close() + defer resp.Body.Close() //nolint:errcheck var vestingStates []models.VestingState err = json.NewDecoder(resp.Body).Decode(&vestingStates) if err != nil { @@ -77,7 +77,7 @@ func (c *Client) CollectAssets(beneficiary string) (*models.CollectTransaction, if resp.StatusCode != http.StatusOK { return nil, fmt.Errorf("unexpected error: %d", resp.Body) } - defer resp.Body.Close() + defer resp.Body.Close() //nolint:errcheck var collectTransaction models.CollectTransaction err = json.NewDecoder(resp.Body).Decode(&collectTransaction) if err != nil { diff --git a/client/pools.go b/client/pools.go index c93a7ad..404fc64 100644 --- a/client/pools.go +++ b/client/pools.go @@ -25,7 +25,7 @@ func (c *Client) ListOfRegisteredPools(params *utils.Parameters) (*models.Regist if resp.StatusCode != http.StatusOK { return nil, fmt.Errorf("unexpected error: %d", resp.Body) } - defer resp.Body.Close() + defer resp.Body.Close() //nolint:errcheck var registeredPools models.RegisteredPools err = json.NewDecoder(resp.Body).Decode(®isteredPools) if err != nil { @@ -53,7 +53,7 @@ func (c *Client) StakePoolMintedBlocks( if resp.StatusCode != http.StatusOK { return nil, fmt.Errorf("unexpected error: %d", resp.Body) } - defer resp.Body.Close() + defer resp.Body.Close() //nolint:errcheck var poolMintedBlocks models.PoolMintedBlocks err = json.NewDecoder(resp.Body).Decode(&poolMintedBlocks) if err != nil { @@ -81,7 +81,7 @@ func (c *Client) StakePoolDelegators( if resp.StatusCode != http.StatusOK { return nil, fmt.Errorf("unexpected error: %d", resp.Body) } - defer resp.Body.Close() + defer resp.Body.Close() //nolint:errcheck var stakePoolDelegators models.StakePoolDelegators err = json.NewDecoder(resp.Body).Decode(&stakePoolDelegators) if err != nil { @@ -109,7 +109,7 @@ func (c *Client) StakePoolHistory( if resp.StatusCode != http.StatusOK { return nil, fmt.Errorf("unexpected error: %d", resp.Body) } - defer resp.Body.Close() + defer resp.Body.Close() //nolint:errcheck var stakePoolHistory models.StakePoolHistory err = json.NewDecoder(resp.Body).Decode(&stakePoolHistory) if err != nil { @@ -130,7 +130,7 @@ func (c *Client) StakePoolInformation(poolId string) (*models.StakePoolInformati if resp.StatusCode != http.StatusOK { return nil, fmt.Errorf("unexpected error: %d", resp.Body) } - defer resp.Body.Close() + defer resp.Body.Close() //nolint:errcheck var stakePoolInformation models.StakePoolInformation err = json.NewDecoder(resp.Body).Decode(&stakePoolInformation) if err != nil { @@ -151,7 +151,7 @@ func (c *Client) StakePoolMetadata(poolId string) (*models.StakePoolMetadata, er if resp.StatusCode != http.StatusOK { return nil, fmt.Errorf("unexpected error: %d", resp.Body) } - defer resp.Body.Close() + defer resp.Body.Close() //nolint:errcheck var stakePoolMetadata models.StakePoolMetadata err = json.NewDecoder(resp.Body).Decode(&stakePoolMetadata) if err != nil { @@ -172,7 +172,7 @@ func (c *Client) StakePoolRelays(poolId string) (*models.StakePoolRelays, error) if resp.StatusCode != http.StatusOK { return nil, fmt.Errorf("unexpected error: %d", resp.Body) } - defer resp.Body.Close() + defer resp.Body.Close() //nolint:errcheck var stakePoolRelays models.StakePoolRelays err = json.NewDecoder(resp.Body).Decode(&stakePoolRelays) if err != nil { @@ -194,7 +194,7 @@ func (c *Client) StakePoolUpdates(poolId string) (*models.StakePoolUpdates, erro if resp.StatusCode != http.StatusOK { return nil, fmt.Errorf("unexpected error: %d", resp.Body) } - defer resp.Body.Close() + defer resp.Body.Close() //nolint:errcheck var stakePoolUpdates models.StakePoolUpdates err = json.NewDecoder(resp.Body).Decode(&stakePoolUpdates) if err != nil { diff --git a/client/scripts.go b/client/scripts.go index df3bc46..fd1ef6c 100644 --- a/client/scripts.go +++ b/client/scripts.go @@ -20,7 +20,7 @@ func (c *Client) ScriptByHash(hash string) (*models.ScriptByHash, error) { if resp.StatusCode != http.StatusOK { return nil, fmt.Errorf("unexpected error: %d", resp.Body) } - defer resp.Body.Close() + defer resp.Body.Close() //nolint:errcheck var scriptByHash models.ScriptByHash err = json.NewDecoder(resp.Body).Decode(&scriptByHash) if err != nil { diff --git a/client/transactions.go b/client/transactions.go index 131e20b..089f8e2 100644 --- a/client/transactions.go +++ b/client/transactions.go @@ -21,7 +21,7 @@ func (c *Client) AddressByOutputReference(txHash string, index int) (*models.Bas if resp.StatusCode != http.StatusOK { return nil, fmt.Errorf("unexpected error: %d", resp.Body) } - defer resp.Body.Close() + defer resp.Body.Close() //nolint:errcheck var addressByOutputReference models.BasicResponse err = json.NewDecoder(resp.Body).Decode(&addressByOutputReference) if err != nil { @@ -43,7 +43,7 @@ func (c *Client) SubmitTx(cbor string) (models.BasicResponse, error) { if resp.StatusCode != http.StatusOK { return models.BasicResponse{}, fmt.Errorf("unexpected error: %d", resp.Body) } - defer resp.Body.Close() + defer resp.Body.Close() //nolint:errcheck var submitTx models.BasicResponse err = json.NewDecoder(resp.Body).Decode(&submitTx) @@ -65,7 +65,7 @@ func (c *Client) TransactionCbor(txHash string) (*models.BasicResponse, error) { if resp.StatusCode != http.StatusOK { return nil, fmt.Errorf("unexpected error: %d", resp.Body) } - defer resp.Body.Close() + defer resp.Body.Close() //nolint:errcheck var transactionCbor models.BasicResponse err = json.NewDecoder(resp.Body).Decode(&transactionCbor) if err != nil { @@ -87,7 +87,7 @@ func (c *Client) TransactionDetails(txHash string) (*models.TransactionDetails, if resp.StatusCode != http.StatusOK { return nil, fmt.Errorf("unexpected error: %d", resp.Body) } - defer resp.Body.Close() + defer resp.Body.Close() //nolint:errcheck var transactionDetails models.TransactionDetails err = json.NewDecoder(resp.Body).Decode(&transactionDetails) if err != nil { @@ -117,7 +117,7 @@ func (c *Client) TransactionOutputFromReference( if resp.StatusCode != http.StatusOK { return nil, fmt.Errorf("unexpected error: %d", resp.Body) } - defer resp.Body.Close() + defer resp.Body.Close() //nolint:errcheck var transactionOutputFromReference models.TransactionOutputFromReference err = json.NewDecoder(resp.Body).Decode(&transactionOutputFromReference) if err != nil { @@ -146,7 +146,7 @@ func (c *Client) TransactionOutputsFromReferences( if resp.StatusCode != http.StatusOK { return nil, fmt.Errorf("unexpected error: %d", resp.Body) } - defer resp.Body.Close() + defer resp.Body.Close() //nolint:errcheck var transactionOutputsFromReferences models.TransactionOutputsFromReferences err = json.NewDecoder(resp.Body).Decode(&transactionOutputsFromReferences) if err != nil { @@ -175,7 +175,7 @@ func (c *Client) EvaluateTx( if resp.StatusCode != http.StatusOK { return nil, fmt.Errorf("unexpected error: %d", resp.Body) } - defer resp.Body.Close() + defer resp.Body.Close() //nolint:errcheck var redeemerEvals models.EvaluateTxResponse err = json.NewDecoder(resp.Body).Decode(&redeemerEvals) if err != nil { diff --git a/client/txmanager.go b/client/txmanager.go index eb40d36..fda1341 100644 --- a/client/txmanager.go +++ b/client/txmanager.go @@ -22,7 +22,7 @@ func (c *Client) TxManagerHistory() (*[]models.TxManagerState, error) { if resp.StatusCode != http.StatusOK { return nil, fmt.Errorf("unexpected error: %d", resp.Body) } - defer resp.Body.Close() + defer resp.Body.Close() //nolint:errcheck var txManagerStates []models.TxManagerState err = json.NewDecoder(resp.Body).Decode(&txManagerStates) if err != nil { @@ -47,7 +47,7 @@ func (c *Client) TxManagerSubmit(txHex string) (string, error) { if resp.StatusCode != http.StatusOK && resp.StatusCode != http.StatusAccepted { return "", fmt.Errorf("unexpected error: %d", resp.Body) } - defer resp.Body.Close() + defer resp.Body.Close() //nolint:errcheck bodyBytes, err := io.ReadAll(resp.Body) if err != nil { return "", err @@ -72,7 +72,7 @@ func (c *Client) TxManagerSubmitTurbo(txHex string) (string, error) { if resp.StatusCode != http.StatusOK && resp.StatusCode != http.StatusAccepted { return "", fmt.Errorf("unexpected error: %d", resp.Body) } - defer resp.Body.Close() + defer resp.Body.Close() //nolint:errcheck bodyBytes, err := io.ReadAll(resp.Body) if err != nil { return "", err @@ -93,7 +93,7 @@ func (c *Client) TxManagerState(txHash string) (*models.TxManagerState, error) { if resp.StatusCode != http.StatusOK { return nil, fmt.Errorf("unexpected error: %d", resp.Body) } - defer resp.Body.Close() + defer resp.Body.Close() //nolint:errcheck var txManagerState models.TxManagerState err = json.NewDecoder(resp.Body).Decode(&txManagerState) if err != nil {