Skip to content

Commit

Permalink
Refactor Error String Formatting According to Go Best Practices (#13092)
Browse files Browse the repository at this point in the history
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
  • Loading branch information
terencechain and prylabs-bulldozer[bot] authored Oct 23, 2023
1 parent beebb56 commit 83932d8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cmd/prysmctl/deprecated/checkpoint/latest.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ var checkpointCmd = &cli.Command{
}

func cliDeprecatedLatest(_ *cli.Context) error {
return fmt.Errorf("This command has moved. Please use 'prysmctl weak-subjectivity checkpoint' instead!")
return fmt.Errorf("this command has moved. Please use 'prysmctl weak-subjectivity checkpoint' instead")
}
2 changes: 1 addition & 1 deletion cmd/prysmctl/deprecated/checkpoint/save.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ var saveCmd = &cli.Command{
}

func cliActionDeprecatedSave(_ *cli.Context) error {
return fmt.Errorf("This command has moved. Please use 'prysmctl checkpoint-sync download' instead!")
return fmt.Errorf("this command has moved. Please use 'prysmctl checkpoint-sync download' instead")
}
4 changes: 2 additions & 2 deletions validator/accounts/accounts_import.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,9 @@ func importPrivateKeyAsAccount(ctx context.Context, wallet *wallet.Wallet, impor
)
return nil
case ethpbservice.ImportedKeystoreStatus_ERROR:
return fmt.Errorf("Could not import keystore for %s: %s", keystore.Pubkey, status.Message)
return fmt.Errorf("could not import keystore for %s: %s", keystore.Pubkey, status.Message)
case ethpbservice.ImportedKeystoreStatus_DUPLICATE:
return fmt.Errorf("Duplicate key %s skipped", keystore.Pubkey)
return fmt.Errorf("duplicate key %s skipped", keystore.Pubkey)
}
}

Expand Down

0 comments on commit 83932d8

Please sign in to comment.