mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-21 23:29:38 +00:00
cli: fix errors format
Error string should not be capitalized or end with punctuation mark. Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
This commit is contained in:
parent
fc2798f9d1
commit
d4a3c912fb
2 changed files with 9 additions and 9 deletions
|
@ -80,14 +80,14 @@ func NewCommands() []*cli.Command {
|
|||
func queryTx(ctx *cli.Context) error {
|
||||
args := ctx.Args().Slice()
|
||||
if len(args) == 0 {
|
||||
return cli.Exit("Transaction hash is missing", 1)
|
||||
return cli.Exit("transaction hash is missing", 1)
|
||||
} else if len(args) > 1 {
|
||||
return cli.Exit("only one transaction hash is accepted", 1)
|
||||
}
|
||||
|
||||
txHash, err := util.Uint256DecodeStringLE(strings.TrimPrefix(args[0], "0x"))
|
||||
if err != nil {
|
||||
return cli.Exit(fmt.Sprintf("Invalid tx hash: %s", args[0]), 1)
|
||||
return cli.Exit(fmt.Sprintf("invalid tx hash: %s", args[0]), 1)
|
||||
}
|
||||
|
||||
gctx, cancel := options.GetTimeoutContext(ctx)
|
||||
|
@ -274,7 +274,7 @@ func queryHeight(ctx *cli.Context) error {
|
|||
func queryVoter(ctx *cli.Context) error {
|
||||
args := ctx.Args().Slice()
|
||||
if len(args) == 0 {
|
||||
return cli.Exit("No address specified", 1)
|
||||
return cli.Exit("no address specified", 1)
|
||||
} else if len(args) > 1 {
|
||||
return cli.Exit("this command only accepts one address", 1)
|
||||
}
|
||||
|
|
|
@ -402,7 +402,7 @@ func changePassword(ctx *cli.Context) error {
|
|||
|
||||
oldPass, err := input.ReadPassword(EnterOldPasswordPrompt)
|
||||
if err != nil {
|
||||
return cli.Exit(fmt.Errorf("Error reading old password: %w", err), 1)
|
||||
return cli.Exit(fmt.Errorf("error reading old password: %w", err), 1)
|
||||
}
|
||||
|
||||
for i := range wall.Accounts {
|
||||
|
@ -417,7 +417,7 @@ func changePassword(ctx *cli.Context) error {
|
|||
|
||||
pass, err := readNewPassword()
|
||||
if err != nil {
|
||||
return cli.Exit(fmt.Errorf("Error reading new password: %w", err), 1)
|
||||
return cli.Exit(fmt.Errorf("error reading new password: %w", err), 1)
|
||||
}
|
||||
for i := range wall.Accounts {
|
||||
if addrFlag.IsSet && wall.Accounts[i].Address != addrFlag.String() {
|
||||
|
@ -430,7 +430,7 @@ func changePassword(ctx *cli.Context) error {
|
|||
}
|
||||
err = wall.Save()
|
||||
if err != nil {
|
||||
return cli.Exit(fmt.Errorf("Error saving the wallet: %w", err), 1)
|
||||
return cli.Exit(fmt.Errorf("error saving the wallet: %w", err), 1)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
@ -455,7 +455,7 @@ func convertWallet(ctx *cli.Context) error {
|
|||
if len(wall.Accounts) != 1 || pass == nil {
|
||||
password, err := input.ReadPassword(fmt.Sprintf("Enter password for account %s (label '%s') > ", acc.Address, acc.Label))
|
||||
if err != nil {
|
||||
return cli.Exit(fmt.Errorf("Error reading password: %w", err), 1)
|
||||
return cli.Exit(fmt.Errorf("error reading password: %w", err), 1)
|
||||
}
|
||||
pass = &password
|
||||
}
|
||||
|
@ -532,7 +532,7 @@ loop:
|
|||
if pass == nil {
|
||||
password, err := input.ReadPassword(EnterPasswordPrompt)
|
||||
if err != nil {
|
||||
return cli.Exit(fmt.Errorf("Error reading password: %w", err), 1)
|
||||
return cli.Exit(fmt.Errorf("error reading password: %w", err), 1)
|
||||
}
|
||||
pass = &password
|
||||
}
|
||||
|
@ -783,7 +783,7 @@ func dumpWallet(ctx *cli.Context) error {
|
|||
if pass == nil {
|
||||
password, err := input.ReadPassword(EnterPasswordPrompt)
|
||||
if err != nil {
|
||||
return cli.Exit(fmt.Errorf("Error reading password: %w", err), 1)
|
||||
return cli.Exit(fmt.Errorf("error reading password: %w", err), 1)
|
||||
}
|
||||
pass = &password
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue