From 564228ff005cc7139a6d9fb3f7919db005a22c85 Mon Sep 17 00:00:00 2001 From: Jim McDonald Date: Mon, 4 Mar 2024 16:34:21 +0000 Subject: [PATCH] Linting. --- .golangci.yml | 1 + cmd/accountcreate.go | 2 +- cmd/accountderive.go | 2 +- cmd/accountimport.go | 2 +- cmd/accountinfo.go | 2 +- cmd/accountkey.go | 2 +- cmd/accountlock.go | 2 +- cmd/accountunlock.go | 2 +- cmd/attesterduties.go | 2 +- cmd/attesterinclusion.go | 2 +- cmd/blockanalyze.go | 2 +- cmd/blockinfo.go | 2 +- cmd/chaineth1votes.go | 2 +- cmd/chaininfo.go | 2 +- cmd/chainqueues.go | 2 +- cmd/chainspec.go | 2 +- cmd/chainstatus.go | 2 +- cmd/chaintime.go | 2 +- cmd/chainverifysignedcontributionandproof.go | 2 +- cmd/depositverify.go | 2 +- cmd/epochsummary.go | 2 +- cmd/exitverify.go | 2 +- cmd/nodeevents.go | 2 +- cmd/nodeinfo.go | 2 +- cmd/proposerduties.go | 2 +- cmd/signatureaggregate.go | 2 +- cmd/signaturesign.go | 2 +- cmd/signatureverify.go | 2 +- cmd/slottime.go | 2 +- cmd/synccommitteeinclusion.go | 2 +- cmd/synccommitteemembers.go | 2 +- cmd/validatorcredentialsget.go | 2 +- cmd/validatorcredentialsset.go | 2 +- cmd/validatordepositdata.go | 2 +- cmd/validatorduties.go | 2 +- cmd/validatorexit.go | 2 +- cmd/validatorexpectation.go | 2 +- cmd/validatorinfo.go | 2 +- cmd/validatorkeycheck.go | 2 +- cmd/validatorsummary.go | 2 +- cmd/validatorwithdrawal.go | 2 +- cmd/validatoryield.go | 2 +- cmd/version.go | 2 +- cmd/walletaccounts.go | 2 +- cmd/walletbatch.go | 2 +- cmd/walletcreate.go | 2 +- cmd/walletdelete.go | 2 +- cmd/walletexport.go | 2 +- cmd/walletimport.go | 2 +- cmd/walletinfo.go | 2 +- cmd/walletlist.go | 2 +- cmd/walletsharedexport.go | 2 +- cmd/walletsharedimport.go | 2 +- 53 files changed, 53 insertions(+), 52 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 99b0a23..017a857 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -158,6 +158,7 @@ linters: - nlreturn - nolintlint - nosnakecase + - perfsprint - promlinter - rowserrcheck - scopelint diff --git a/cmd/accountcreate.go b/cmd/accountcreate.go index c1d2006..87ea7d8 100644 --- a/cmd/accountcreate.go +++ b/cmd/accountcreate.go @@ -29,7 +29,7 @@ var accountCreateCmd = &cobra.Command{ ethdo account create --account="primary/operations" --passphrase="my secret" In quiet mode this will return 0 if the account is created successfully, otherwise 1.`, - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { res, err := accountcreate.Run(cmd) if err != nil { return err diff --git a/cmd/accountderive.go b/cmd/accountderive.go index 86511bb..bb1a73a 100644 --- a/cmd/accountderive.go +++ b/cmd/accountderive.go @@ -29,7 +29,7 @@ var accountDeriveCmd = &cobra.Command{ ethdo account derive --mnemonic="..." --path="m/12381/3600/0/0" In quiet mode this will return 0 if the inputs can derive an account account, otherwise 1.`, - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { res, err := accountderive.Run(cmd) if err != nil { return err diff --git a/cmd/accountimport.go b/cmd/accountimport.go index 13591bc..2bc9b9a 100644 --- a/cmd/accountimport.go +++ b/cmd/accountimport.go @@ -29,7 +29,7 @@ var accountImportCmd = &cobra.Command{ ethdo account import --account="primary/testing" --key="0x..." --passphrase="my secret" In quiet mode this will return 0 if the account is imported successfully, otherwise 1.`, - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { res, err := accountimport.Run(cmd) if err != nil { return err diff --git a/cmd/accountinfo.go b/cmd/accountinfo.go index d81d781..685b449 100644 --- a/cmd/accountinfo.go +++ b/cmd/accountinfo.go @@ -33,7 +33,7 @@ var accountInfoCmd = &cobra.Command{ ethdo account info --account="primary/my funds" In quiet mode this will return 0 if the account exists, otherwise 1.`, - Run: func(cmd *cobra.Command, args []string) { + Run: func(_ *cobra.Command, _ []string) { ctx, cancel := context.WithTimeout(context.Background(), viper.GetDuration("timeout")) defer cancel() diff --git a/cmd/accountkey.go b/cmd/accountkey.go index b3ebc6c..7b15b8a 100644 --- a/cmd/accountkey.go +++ b/cmd/accountkey.go @@ -30,7 +30,7 @@ var accountKeyCmd = &cobra.Command{ ethdo account key --account="Personal wallet/Operations" --passphrase="my account passphrase" In quiet mode this will return 0 if the key can be obtained, otherwise 1.`, - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { res, err := accountkey.Run(cmd) if err != nil { return err diff --git a/cmd/accountlock.go b/cmd/accountlock.go index d76af31..c4450d7 100644 --- a/cmd/accountlock.go +++ b/cmd/accountlock.go @@ -29,7 +29,7 @@ var accountLockCmd = &cobra.Command{ ethdo account lock --account="primary/my funds" In quiet mode this will return 0 if the account is locked, otherwise 1.`, - Run: func(cmd *cobra.Command, args []string) { + Run: func(_ *cobra.Command, _ []string) { ctx, cancel := context.WithTimeout(context.Background(), viper.GetDuration("timeout")) defer cancel() diff --git a/cmd/accountunlock.go b/cmd/accountunlock.go index 8ac4f5a..72ae220 100644 --- a/cmd/accountunlock.go +++ b/cmd/accountunlock.go @@ -30,7 +30,7 @@ var accountUnlockCmd = &cobra.Command{ ethdo account unlock --account="primary/my funds" --passphrase="secret" In quiet mode this will return 0 if the account is unlocked, otherwise 1.`, - Run: func(cmd *cobra.Command, args []string) { + Run: func(_ *cobra.Command, _ []string) { ctx, cancel := context.WithTimeout(context.Background(), viper.GetDuration("timeout")) defer cancel() diff --git a/cmd/attesterduties.go b/cmd/attesterduties.go index 672e8f5..8d42eb6 100644 --- a/cmd/attesterduties.go +++ b/cmd/attesterduties.go @@ -29,7 +29,7 @@ var attesterDutiesCmd = &cobra.Command{ ethdo attester duties --validator=Validators/00001 --epoch=12345 In quiet mode this will return 0 if a duty from the attester is found, otherwise 1.`, - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { res, err := attesterduties.Run(cmd) if err != nil { return err diff --git a/cmd/attesterinclusion.go b/cmd/attesterinclusion.go index de2a113..b756a83 100644 --- a/cmd/attesterinclusion.go +++ b/cmd/attesterinclusion.go @@ -29,7 +29,7 @@ var attesterInclusionCmd = &cobra.Command{ ethdo attester inclusion --validator=Validators/00001 --epoch=12345 In quiet mode this will return 0 if an attestation from the attester is found on the block of the given epoch, otherwise 1.`, - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { res, err := attesterinclusion.Run(cmd) if err != nil { return err diff --git a/cmd/blockanalyze.go b/cmd/blockanalyze.go index 5bc4839..97320c9 100644 --- a/cmd/blockanalyze.go +++ b/cmd/blockanalyze.go @@ -29,7 +29,7 @@ var blockAnalyzeCmd = &cobra.Command{ ethdo block analyze --blockid=12345 In quiet mode this will return 0 if the block information is present and not skipped, otherwise 1.`, - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { res, err := blockanalyze.Run(cmd) if err != nil { return err diff --git a/cmd/blockinfo.go b/cmd/blockinfo.go index f7de023..c263a1d 100644 --- a/cmd/blockinfo.go +++ b/cmd/blockinfo.go @@ -29,7 +29,7 @@ var blockInfoCmd = &cobra.Command{ ethdo block info --blockid=12345 In quiet mode this will return 0 if the block information is present and not skipped, otherwise 1.`, - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { res, err := blockinfo.Run(cmd) if err != nil { return err diff --git a/cmd/chaineth1votes.go b/cmd/chaineth1votes.go index 6565369..3d3c94e 100644 --- a/cmd/chaineth1votes.go +++ b/cmd/chaineth1votes.go @@ -31,7 +31,7 @@ var chainEth1VotesCmd = &cobra.Command{ Note that this will fetch the votes made in blocks up to the end of the provided epoch. In quiet mode this will return 0 if there is a majority for the votes, otherwise 1.`, - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { res, err := chaineth1votes.Run(cmd) if err != nil { return err diff --git a/cmd/chaininfo.go b/cmd/chaininfo.go index 3ed9606..dc14233 100644 --- a/cmd/chaininfo.go +++ b/cmd/chaininfo.go @@ -35,7 +35,7 @@ var chainInfoCmd = &cobra.Command{ ethdo chain info In quiet mode this will return 0 if the chain information can be obtained, otherwise 1.`, - Run: func(cmd *cobra.Command, args []string) { + Run: func(_ *cobra.Command, _ []string) { ctx := context.Background() eth2Client, err := util.ConnectToBeaconNode(ctx, &util.ConnectOpts{ diff --git a/cmd/chainqueues.go b/cmd/chainqueues.go index 55e7bbe..3513fa0 100644 --- a/cmd/chainqueues.go +++ b/cmd/chainqueues.go @@ -29,7 +29,7 @@ var chainQueuesCmd = &cobra.Command{ ethdo chain queues In quiet mode this will return 0 if the entry and exit queues are 0, otherwise 1.`, - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { res, err := chainqueues.Run(cmd) if err != nil { return err diff --git a/cmd/chainspec.go b/cmd/chainspec.go index 49e3ba4..c703541 100644 --- a/cmd/chainspec.go +++ b/cmd/chainspec.go @@ -37,7 +37,7 @@ var chainSpecCmd = &cobra.Command{ ethdo chain spec In quiet mode this will return 0 if the chain specification can be obtained, otherwise 1.`, - Run: func(cmd *cobra.Command, args []string) { + Run: func(_ *cobra.Command, _ []string) { ctx := context.Background() eth2Client, err := util.ConnectToBeaconNode(ctx, &util.ConnectOpts{ diff --git a/cmd/chainstatus.go b/cmd/chainstatus.go index ef19803..b0df412 100644 --- a/cmd/chainstatus.go +++ b/cmd/chainstatus.go @@ -40,7 +40,7 @@ var chainStatusCmd = &cobra.Command{ ethdo chain status In quiet mode this will return 0 if the chain status can be obtained, otherwise 1.`, - Run: func(cmd *cobra.Command, args []string) { + Run: func(_ *cobra.Command, _ []string) { ctx := context.Background() eth2Client, err := util.ConnectToBeaconNode(ctx, &util.ConnectOpts{ diff --git a/cmd/chaintime.go b/cmd/chaintime.go index 64c6f29..6db4e10 100644 --- a/cmd/chaintime.go +++ b/cmd/chaintime.go @@ -27,7 +27,7 @@ var chainTimeCmd = &cobra.Command{ Long: `Obtain info about the chain at a given time. For example: ethdo chain time --slot=12345`, - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { res, err := chaintime.Run(cmd) if err != nil { return err diff --git a/cmd/chainverifysignedcontributionandproof.go b/cmd/chainverifysignedcontributionandproof.go index a79ca12..ed3146e 100644 --- a/cmd/chainverifysignedcontributionandproof.go +++ b/cmd/chainverifysignedcontributionandproof.go @@ -28,7 +28,7 @@ var chainVerifySignedContributionAndProofCmd = &cobra.Command{ ethdo chain verify signedcontributionandproof --data=... --validator=... validator can be an account, a public key or an index.`, - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { res, err := chainverifysignedcontributionandproof.Run(cmd) if err != nil { return err diff --git a/cmd/depositverify.go b/cmd/depositverify.go index f6ed8b0..7d138c4 100644 --- a/cmd/depositverify.go +++ b/cmd/depositverify.go @@ -50,7 +50,7 @@ var depositVerifyCmd = &cobra.Command{ The deposit data is compared to the supplied withdrawal account/public key, validator public key, and value to ensure they match. In quiet mode this will return 0 if the data is verified correctly, otherwise 1.`, - Run: func(cmd *cobra.Command, args []string) { + Run: func(_ *cobra.Command, _ []string) { assert(depositVerifyData != "", "--data is required") var data []byte var err error diff --git a/cmd/epochsummary.go b/cmd/epochsummary.go index bbc2886..bdfaaac 100644 --- a/cmd/epochsummary.go +++ b/cmd/epochsummary.go @@ -29,7 +29,7 @@ var epochSummaryCmd = &cobra.Command{ ethdo epoch summary --epoch=12345 In quiet mode this will return 0 if information for the epoch is found, otherwise 1.`, - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { res, err := epochsummary.Run(cmd) if err != nil { return err diff --git a/cmd/exitverify.go b/cmd/exitverify.go index 4517c86..4c5b6e2 100644 --- a/cmd/exitverify.go +++ b/cmd/exitverify.go @@ -39,7 +39,7 @@ var exitVerifyCmd = &cobra.Command{ ethdo exit verify --signed-operation=exitdata.json --validator=primary/current In quiet mode this will return 0 if the exit is verified correctly, otherwise 1.`, - Run: func(cmd *cobra.Command, args []string) { + Run: func(_ *cobra.Command, _ []string) { ctx := context.Background() assert(viper.GetString("signed-operation") != "", "signed-operation is required") diff --git a/cmd/nodeevents.go b/cmd/nodeevents.go index 0896115..7dc2ed1 100644 --- a/cmd/nodeevents.go +++ b/cmd/nodeevents.go @@ -27,7 +27,7 @@ var nodeEventsCmd = &cobra.Command{ Long: `Report events from a node. For example: ethdo node events --events=head,chain_reorg.`, - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { res, err := nodeevents.Run(cmd) if err != nil { return err diff --git a/cmd/nodeinfo.go b/cmd/nodeinfo.go index 03b9b9f..5dab199 100644 --- a/cmd/nodeinfo.go +++ b/cmd/nodeinfo.go @@ -33,7 +33,7 @@ var nodeInfoCmd = &cobra.Command{ ethdo node info In quiet mode this will return 0 if the node information can be obtained, otherwise 1.`, - Run: func(cmd *cobra.Command, args []string) { + Run: func(_ *cobra.Command, _ []string) { ctx := context.Background() eth2Client, err := util.ConnectToBeaconNode(ctx, &util.ConnectOpts{ diff --git a/cmd/proposerduties.go b/cmd/proposerduties.go index 067b828..7785103 100644 --- a/cmd/proposerduties.go +++ b/cmd/proposerduties.go @@ -29,7 +29,7 @@ var proposerDutiesCmd = &cobra.Command{ ethdo proposer duties --epoch=12345 In quiet mode this will return 0 if duties can be obtained, otherwise 1.`, - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { res, err := proposerduties.Run(cmd) if err != nil { return err diff --git a/cmd/signatureaggregate.go b/cmd/signatureaggregate.go index 31c7427..65e544f 100644 --- a/cmd/signatureaggregate.go +++ b/cmd/signatureaggregate.go @@ -40,7 +40,7 @@ var signatureAggregateCmd = &cobra.Command{ Signatures are specified as "signature" for simple aggregation, and as "id:signature" for threshold aggregation. In quiet mode this will return 0 if the signatures can be aggregated, otherwise 1.`, - Run: func(cmd *cobra.Command, args []string) { + Run: func(_ *cobra.Command, _ []string) { assert(len(signatureAggregateSignatures) > 1, "multiple signatures required to aggregate") var signature *bls.Sign var err error diff --git a/cmd/signaturesign.go b/cmd/signaturesign.go index edd6227..17d49a9 100644 --- a/cmd/signaturesign.go +++ b/cmd/signaturesign.go @@ -36,7 +36,7 @@ var signatureSignCmd = &cobra.Command{ ethdo signature sign --data=0x5f24e819400c6a8ee2bfc014343cd971b7eb707320025a7bcd83e621e26c35b7 --account="Personal wallet/Operations" --passphrase="my account passphrase" In quiet mode this will return 0 if the data can be signed, otherwise 1.`, - Run: func(cmd *cobra.Command, args []string) { + Run: func(_ *cobra.Command, _ []string) { ctx, cancel := context.WithTimeout(context.Background(), viper.GetDuration("timeout")) defer cancel() diff --git a/cmd/signatureverify.go b/cmd/signatureverify.go index fd45ba8..4f60938 100644 --- a/cmd/signatureverify.go +++ b/cmd/signatureverify.go @@ -41,7 +41,7 @@ var signatureVerifyCmd = &cobra.Command{ ethdo signature verify --data=0x5f24e819400c6a8ee2bfc014343cd971b7eb707320025a7bcd83e621e26c35b7 --signature=0x8888... --account="Personal wallet/Operations" In quiet mode this will return 0 if the data can be signed, otherwise 1.`, - Run: func(cmd *cobra.Command, args []string) { + Run: func(_ *cobra.Command, _ []string) { ctx, cancel := context.WithTimeout(context.Background(), viper.GetDuration("timeout")) defer cancel() diff --git a/cmd/slottime.go b/cmd/slottime.go index b83ffdf..a7cfeca 100644 --- a/cmd/slottime.go +++ b/cmd/slottime.go @@ -29,7 +29,7 @@ var slotTimeCmd = &cobra.Command{ ethdo slot time --slot=12345 In quiet mode this will return 0.`, - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { res, err := slottime.Run(cmd) if err != nil { return err diff --git a/cmd/synccommitteeinclusion.go b/cmd/synccommitteeinclusion.go index e0756e8..323ff83 100644 --- a/cmd/synccommitteeinclusion.go +++ b/cmd/synccommitteeinclusion.go @@ -31,7 +31,7 @@ var synccommitteeInclusionCmd = &cobra.Command{ In quiet mode this will return 0 if the validator was in the sync committee, otherwise 1. epoch can be a specific epoch; If not supplied all slots for the current sync committee period will be provided`, - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { res, err := synccommitteeinclusion.Run(cmd) if err != nil { return err diff --git a/cmd/synccommitteemembers.go b/cmd/synccommitteemembers.go index ef2a333..7b27152 100644 --- a/cmd/synccommitteemembers.go +++ b/cmd/synccommitteemembers.go @@ -31,7 +31,7 @@ var synccommitteeMembersCmd = &cobra.Command{ In quiet mode this will return 0 if the synccommittee members are found, otherwise 1. epoch can be a specific epoch. period can be 'current' for the current sync period or 'next' for the next sync period`, - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { res, err := synccommitteemembers.Run(cmd) if err != nil { return err diff --git a/cmd/validatorcredentialsget.go b/cmd/validatorcredentialsget.go index b731540..0931671 100644 --- a/cmd/validatorcredentialsget.go +++ b/cmd/validatorcredentialsget.go @@ -29,7 +29,7 @@ var validatorCredentialsGetCmd = &cobra.Command{ ethdo validator credentials get --validator=primary/validator In quiet mode this will return 0 if the validator exists, otherwise 1.`, - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { res, err := validatorcredentialsget.Run(cmd) if err != nil { return err diff --git a/cmd/validatorcredentialsset.go b/cmd/validatorcredentialsset.go index bcb3afa..4cafda1 100644 --- a/cmd/validatorcredentialsset.go +++ b/cmd/validatorcredentialsset.go @@ -38,7 +38,7 @@ The validator account can be specified in one of a number of ways: - account and withdrawal account using --account and --withdrawal-account; this will generate a single operation In quiet mode this will return 0 if the credentials operation has been generated (and successfully broadcast if online), otherwise 1.`, - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { res, err := validatorcredentialsset.Run(cmd) if err != nil { return err diff --git a/cmd/validatordepositdata.go b/cmd/validatordepositdata.go index 7e9f037..12a0367 100644 --- a/cmd/validatordepositdata.go +++ b/cmd/validatordepositdata.go @@ -33,7 +33,7 @@ If validatoraccount is provided with an account path it will generate deposit da The information generated can be passed to ethereal to create a deposit from the Ethereum 1 chain. In quiet mode this will return 0 if the data can be generated correctly, otherwise 1.`, - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { res, err := validatordepositdata.Run(cmd) if err != nil { return err diff --git a/cmd/validatorduties.go b/cmd/validatorduties.go index bade2be..6d5f0f6 100644 --- a/cmd/validatorduties.go +++ b/cmd/validatorduties.go @@ -31,7 +31,7 @@ var validatorDutiesCmd = &cobra.Command{ Attester duties are known for the current and next epoch. Proposer duties are known for the current epoch. In quiet mode this will return 0 if the duties have been obtained, otherwise 1.`, - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { res, err := validatorduties.Run(cmd) if err != nil { return err diff --git a/cmd/validatorexit.go b/cmd/validatorexit.go index 0c65695..0e4418e 100644 --- a/cmd/validatorexit.go +++ b/cmd/validatorexit.go @@ -39,7 +39,7 @@ The validator and key can be specified in one of a number of ways: - validator account using --validator In quiet mode this will return 0 if the exit operation has been generated (and successfully broadcast if online), otherwise 1.`, - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { res, err := validatorexit.Run(cmd) if err != nil { return err diff --git a/cmd/validatorexpectation.go b/cmd/validatorexpectation.go index 4b5549e..632e535 100644 --- a/cmd/validatorexpectation.go +++ b/cmd/validatorexpectation.go @@ -28,7 +28,7 @@ var validatorExpectationCmd = &cobra.Command{ Long: `Calculate expectation for individual validators. For example: ethdo validator expectation`, - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { res, err := validatorexpectation.Run(cmd) if err != nil { return err diff --git a/cmd/validatorinfo.go b/cmd/validatorinfo.go index b0658d5..401373a 100644 --- a/cmd/validatorinfo.go +++ b/cmd/validatorinfo.go @@ -43,7 +43,7 @@ var validatorInfoCmd = &cobra.Command{ ethdo validator info --validator=primary/validator In quiet mode this will return 0 if the validator information can be obtained, otherwise 1.`, - Run: func(cmd *cobra.Command, args []string) { + Run: func(_ *cobra.Command, _ []string) { ctx := context.Background() eth2Client, err := util.ConnectToBeaconNode(ctx, &util.ConnectOpts{ diff --git a/cmd/validatorkeycheck.go b/cmd/validatorkeycheck.go index fea80bc..928e49d 100644 --- a/cmd/validatorkeycheck.go +++ b/cmd/validatorkeycheck.go @@ -31,7 +31,7 @@ var validatorKeycheckCmd = &cobra.Command{ A mnemonic can be used in place of a private key, in which case the first 1,024 indices of the standard withdrawal key path will be scanned for a matching key. In quiet mode this will return 0 if the withdrawal credentials match the key, otherwise 1.`, - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { res, err := validatorkeycheck.Run(cmd) if err != nil { return err diff --git a/cmd/validatorsummary.go b/cmd/validatorsummary.go index 56fc429..0a9dd81 100644 --- a/cmd/validatorsummary.go +++ b/cmd/validatorsummary.go @@ -29,7 +29,7 @@ var validatorSummaryCmd = &cobra.Command{ ethdo validator summary --validators=1,2,3 --epoch=12345 In quiet mode this will return 0 if information for the epoch is found, otherwise 1.`, - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { res, err := validatorsummary.Run(cmd) if err != nil { return err diff --git a/cmd/validatorwithdrawal.go b/cmd/validatorwithdrawal.go index 34dd883..e2dae13 100644 --- a/cmd/validatorwithdrawal.go +++ b/cmd/validatorwithdrawal.go @@ -29,7 +29,7 @@ var validatorWithdrawalCmd = &cobra.Command{ ethdo validator withdrawal --validator=primary/validator In quiet mode this will return 0 if the validator exists, otherwise 1.`, - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { res, err := validatorwithdrawal.Run(cmd) if err != nil { return err diff --git a/cmd/validatoryield.go b/cmd/validatoryield.go index d8e716c..aab78c0 100644 --- a/cmd/validatoryield.go +++ b/cmd/validatoryield.go @@ -30,7 +30,7 @@ var validatorYieldCmd = &cobra.Command{ ethdo validator yield It is important to understand the yield is both probabilistic and dependent on network conditions.`, - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { res, err := validatoryield.Run(cmd) if err != nil { return err diff --git a/cmd/version.go b/cmd/version.go index 502c822..68383bb 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -33,7 +33,7 @@ var versionCmd = &cobra.Command{ Long: `Obtain the version of ethdo. For example: ethdo version`, - Run: func(cmd *cobra.Command, args []string) { + Run: func(_ *cobra.Command, _ []string) { fmt.Println(ReleaseVersion) if viper.GetBool("verbose") { if info, ok := debug.ReadBuildInfo(); ok { diff --git a/cmd/walletaccounts.go b/cmd/walletaccounts.go index 589f9bf..ad5f981 100644 --- a/cmd/walletaccounts.go +++ b/cmd/walletaccounts.go @@ -34,7 +34,7 @@ var walletAccountsCmd = &cobra.Command{ ethdo wallet accounts --wallet=primary In quiet mode this will return 0 if the wallet holds any addresses, otherwise 1.`, - Run: func(cmd *cobra.Command, args []string) { + Run: func(_ *cobra.Command, _ []string) { ctx, cancel := context.WithTimeout(context.Background(), viper.GetDuration("timeout")) defer cancel() diff --git a/cmd/walletbatch.go b/cmd/walletbatch.go index 225f35f..dd2a315 100644 --- a/cmd/walletbatch.go +++ b/cmd/walletbatch.go @@ -29,7 +29,7 @@ var walletBatchCmd = &cobra.Command{ ethdo wallet batch --wallet="Primary wallet" --passphrase=accounts-secret --batch-passphrase=batch-secret In quiet mode this will return 0 if the wallet is batched successfully, otherwise 1.`, - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { res, err := walletbatch.Run(cmd) if err != nil { return err diff --git a/cmd/walletcreate.go b/cmd/walletcreate.go index 0f992a8..6db2cac 100644 --- a/cmd/walletcreate.go +++ b/cmd/walletcreate.go @@ -29,7 +29,7 @@ var walletCreateCmd = &cobra.Command{ ethdo wallet create --wallet="Primary wallet" --type=non-deterministic In quiet mode this will return 0 if the wallet is created successfully, otherwise 1.`, - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { res, err := walletcreate.Run(cmd) if err != nil { return err diff --git a/cmd/walletdelete.go b/cmd/walletdelete.go index 3a5c2dd..9489596 100644 --- a/cmd/walletdelete.go +++ b/cmd/walletdelete.go @@ -28,7 +28,7 @@ var walletDeleteCmd = &cobra.Command{ ethdo wallet delete --wallet=primary In quiet mode this will return 0 if the wallet has been deleted, otherwise 1.`, - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { res, err := walletdelete.Run(cmd) if err != nil { return err diff --git a/cmd/walletexport.go b/cmd/walletexport.go index 206e8f8..8724cd6 100644 --- a/cmd/walletexport.go +++ b/cmd/walletexport.go @@ -28,7 +28,7 @@ var walletExportCmd = &cobra.Command{ ethdo wallet export --wallet=primary --passphrase="my export secret" In quiet mode this will return 0 if the wallet is able to be exported, otherwise 1.`, - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { res, err := walletexport.Run(cmd) if err != nil { return err diff --git a/cmd/walletimport.go b/cmd/walletimport.go index d778d5e..f4ce37e 100644 --- a/cmd/walletimport.go +++ b/cmd/walletimport.go @@ -29,7 +29,7 @@ var walletImportCmd = &cobra.Command{ ethdo wallet import --data=primary --passphrase="my export secret" In quiet mode this will return 0 if the wallet is imported successfully, otherwise 1.`, - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { res, err := walletimport.Run(cmd) if err != nil { return err diff --git a/cmd/walletinfo.go b/cmd/walletinfo.go index 3e6b72a..c07ec40 100644 --- a/cmd/walletinfo.go +++ b/cmd/walletinfo.go @@ -32,7 +32,7 @@ var walletInfoCmd = &cobra.Command{ ethdo wallet info --wallet=primary In quiet mode this will return 0 if the wallet exists, otherwise 1.`, - Run: func(cmd *cobra.Command, args []string) { + Run: func(_ *cobra.Command, _ []string) { ctx, cancel := context.WithTimeout(context.Background(), viper.GetDuration("timeout")) defer cancel() diff --git a/cmd/walletlist.go b/cmd/walletlist.go index 07f0e2b..c005773 100644 --- a/cmd/walletlist.go +++ b/cmd/walletlist.go @@ -30,7 +30,7 @@ var walletListCmd = &cobra.Command{ ethdo wallet list In quiet mode this will return 0 if any wallets are found, otherwise 1.`, - Run: func(cmd *cobra.Command, args []string) { + Run: func(_ *cobra.Command, _ []string) { assert(viper.GetString("remote") == "", "wallet list not available with remote wallets") assert(viper.GetString("wallet") == "", "wallet list does not take a --wallet parameter") diff --git a/cmd/walletsharedexport.go b/cmd/walletsharedexport.go index c7c21a2..52eb0a3 100644 --- a/cmd/walletsharedexport.go +++ b/cmd/walletsharedexport.go @@ -27,7 +27,7 @@ var walletSharedExportCmd = &cobra.Command{ Long: `Export a wallet for backup of transfer using Shamir secret sharing. For example: ethdo wallet sharedexport --wallet=primary --participants=5 --threshold=3 --file=backup.dat`, - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { res, err := walletsharedexport.Run(cmd) if err != nil { return err diff --git a/cmd/walletsharedimport.go b/cmd/walletsharedimport.go index d2eaaa3..198f126 100644 --- a/cmd/walletsharedimport.go +++ b/cmd/walletsharedimport.go @@ -29,7 +29,7 @@ var walletSharedImportCmd = &cobra.Command{ ethdo wallet sharedimport --file=backup.dat --shares="1234 2345 3456" In quiet mode this will return 0 if the wallet is imported successfully, otherwise 1.`, - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { res, err := walletsharedimport.Run(cmd) if err != nil { return err