docs(client/debug): correct debug raw-bytes command example (backport #21671) (#21676)

Co-authored-by: lilasxie <thanklilas@163.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
This commit is contained in:
mergify[bot] 2024-09-12 08:06:28 +00:00 committed by GitHub
parent 63a535e8d2
commit ef8a575d7f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -298,14 +298,11 @@ $ %s debug addr cosmos1e0jnq2sun3dzjh8p2xq95kk0expwmd7shwjpfg
func RawBytesCmd() *cobra.Command {
return &cobra.Command{
Use: "raw-bytes [raw-bytes]",
Short: "Convert raw bytes output (eg. [10 21 13 255]) to hex",
Long: fmt.Sprintf(`Convert raw-bytes to hex.
Example:
$ %s debug raw-bytes [72 101 108 108 111 44 32 112 108 97 121 103 114 111 117 110 100]
`, version.AppName),
Args: cobra.ExactArgs(1),
Use: "raw-bytes <raw-bytes>",
Short: "Convert raw bytes output (eg. [10 21 13 255]) to hex",
Long: "Convert raw-bytes to hex.",
Example: fmt.Sprintf("%s debug raw-bytes '[72 101 108 108 111 44 32 112 108 97 121 103 114 111 117 110 100]'", version.AppName),
Args: cobra.ExactArgs(1),
RunE: func(_ *cobra.Command, args []string) error {
stringBytes := args[0]
stringBytes = strings.Trim(stringBytes, "[")