From f2ccd41c37640ce5122a8ff4f5770d276cc2b596 Mon Sep 17 00:00:00 2001 From: Gary Rong Date: Thu, 21 Dec 2023 21:56:36 +0800 Subject: [PATCH] cmd/geth: improve msg --- cmd/geth/dbcmd.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/geth/dbcmd.go b/cmd/geth/dbcmd.go index c057675bdd..502f6d2f1d 100644 --- a/cmd/geth/dbcmd.go +++ b/cmd/geth/dbcmd.go @@ -211,11 +211,11 @@ func removeDB(ctx *cli.Context) error { } // Delete state data statePaths := []string{rootDir, filepath.Join(ancientDir, rawdb.StateFreezerName)} - confirmAndRemoveDB(statePaths, "full node state database") + confirmAndRemoveDB(statePaths, "state database") // Delete ancient chain chainPaths := []string{filepath.Join(ancientDir, rawdb.ChainFreezerName)} - confirmAndRemoveDB(chainPaths, "full node ancient chain") + confirmAndRemoveDB(chainPaths, "ancient chain") return nil } @@ -238,9 +238,9 @@ func removeFolder(dir string) { // confirmAndRemoveDB prompts the user for a last confirmation and removes the // list of folders if accepted. func confirmAndRemoveDB(paths []string, kind string) { - msg := fmt.Sprintf("Remove %s?\n", kind) + msg := fmt.Sprintf("Remove %s? ", kind) for _, path := range paths { - msg += fmt.Sprintf("\t- %s\n", path) + msg += fmt.Sprintf("(%s) ", path) } confirm, err := prompt.Stdin.PromptConfirm(msg) switch {