Skip to content

Commit cdb69ea

Browse files
committed
refactor description
1 parent ddf3aa0 commit cdb69ea

16 files changed

+50
-25
lines changed

cmd/convert/abi_string.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ import (
1111

1212
func GetConvertAbiStringCmd() *cobra.Command {
1313
cmd := &cobra.Command{
14-
Use: "abi_string [hex_or_text]",
15-
Short: `Convert ABI encoded hex to string or vice versa.
14+
Use: "abi_string [hex_or_text]",
15+
Short: `Convert ABI encoded hex to string or vice versa.`,
16+
Long: `Convert ABI encoded hex to string or vice versa.
1617
Support pipe.`,
1718
Run: func(cmd *cobra.Command, args []string) {
1819
args, err := utils.ProvidedArgsOrFromPipe(args)

cmd/convert/address.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ func GetConvertAddressCmd() *cobra.Command {
1717
cmd := &cobra.Command{
1818
Use: "address [address] [bech32_hrp]",
1919
Aliases: []string{"a"},
20-
Short: "Convert account bech32 address into hex address or vice versa",
20+
Short: "Convert account bech32 address into hex address or vice versa.",
2121
Long: `Convert account bech32 address into hex address or vice versa.
2222
- Case 1: if the input address is an EVM address, bech32 HRP as the second argument is required.
2323
- Case 2: if the input address is a bech32 address, bech32 HRP as the second argument is present, convert.

cmd/convert/decimal_to_hexadecimal.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ func GetConvertDecimalToHexadecimalCmd() *cobra.Command {
1313
cmd := &cobra.Command{
1414
Use: "dec_2_hex [dec]",
1515
Aliases: []string{"d2h"},
16-
Short: `Convert decimal to hexadecimal.
16+
Short: "Convert decimal to hexadecimal.",
17+
Long: `Convert decimal to hexadecimal.
1718
Support pipe.`,
1819
Run: func(cmd *cobra.Command, args []string) {
1920
args, err := utils.ProvidedArgsOrFromPipe(args)

cmd/convert/decode_base64.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ import (
1010
// GetDecodeBase64CaseCmd creates a helper command that decode base64
1111
func GetDecodeBase64CaseCmd() *cobra.Command {
1212
cmd := &cobra.Command{
13-
Use: "decode_base64 [base64]",
14-
Short: `Decode base64.
13+
Use: "decode_base64 [base64]",
14+
Short: "Decode base64.",
15+
Long: `Decode base64.
1516
Support pipe.`,
1617
Run: func(cmd *cobra.Command, args []string) {
1718
args, err := utils.ProvidedArgsOrFromPipe(args)

cmd/convert/display_balance.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ func GetDisplayBalanceCmd() *cobra.Command {
1414
cmd := &cobra.Command{
1515
Use: "display_balance [raw_balance] [decimals]",
1616
Aliases: []string{"dbal"},
17-
Short: `Convert raw balance into display balance.
18-
Sample: 10011100 + 6 = 10.0111`,
17+
Short: "Convert raw balance into display balance.",
18+
Long: `Convert raw balance into display balance.
19+
Sample: 10011100 with 6 exponent => 10.0111`,
1920
Args: cobra.ExactArgs(2),
2021
Run: func(cmd *cobra.Command, args []string) {
2122
rawBalanceStr := args[0]

cmd/convert/encode_base64.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ func GetEncodeBase64CaseCmd() *cobra.Command {
1313
cmd := &cobra.Command{
1414
Use: "encode_base64 [text]",
1515
Aliases: []string{"base64"},
16-
Short: `Encode input into base64.
16+
Short: "Encode input text into base64.",
17+
Long: `Encode input text into base64.
1718
Support pipe.`,
1819
Run: func(cmd *cobra.Command, args []string) {
1920
args, err := utils.ProvidedArgsOrFromPipe(args)

cmd/convert/hexadecimal_to_decimal.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ func GetConvertHexadecimalToDecimalCmd() *cobra.Command {
1414
cmd := &cobra.Command{
1515
Use: "hex_2_dec [hex]",
1616
Aliases: []string{"h2d"},
17-
Short: `Convert hexadecimal to decimal.
17+
Short: "Convert hexadecimal to decimal.",
18+
Long: `Convert hexadecimal to decimal.
1819
Support pipe.`,
1920
Run: func(cmd *cobra.Command, args []string) {
2021
args, err := utils.ProvidedArgsOrFromPipe(args)

cmd/convert/raw_balance.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ func GetRawBalanceCmd() *cobra.Command {
1818
cmd := &cobra.Command{
1919
Use: "raw_balance [display_balance] [decimals]",
2020
Aliases: []string{"rbal"},
21-
Short: `Convert display balance into raw balance.
22-
Sample: 10.0111 + 6 = 10011100`,
21+
Short: "Convert display balance into raw balance.",
22+
Long: `Convert display balance into raw balance.
23+
Sample: 10.0111 with 6 exponent => 10011100`,
2324
Args: cobra.ExactArgs(2),
2425
Run: func(cmd *cobra.Command, args []string) {
2526
displayBalanceStr := args[0]

cmd/convert/solc_sig.go

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,15 @@ import (
1414
func GetConvertSolcSignatureCmd() *cobra.Command {
1515
cmd := &cobra.Command{
1616
Use: "solc_sig [method_or_event]",
17-
Short: "Convert Solidity method/event signature into hashed signature and 4 bytes",
18-
Args: cobra.MinimumNArgs(1),
17+
Short: "Convert Solidity method/event signature into hashed signature and 4 bytes signature.",
18+
Long: `Convert Solidity method/event signature into hashed signature and 4 bytes signature.
19+
Output will be 4 lines:
20+
1. Type: Method/Event
21+
2. Method/Event interface used for apply keccak256 on
22+
3. Hashed signature
23+
4. Type based: Event will show hashed signature, Method will show 4 bytes signature
24+
`,
25+
Args: cobra.MinimumNArgs(1),
1926
Run: func(cmd *cobra.Command, args []string) {
2027
_interface := strings.Join(args, " ")
2128

cmd/convert/to_lower_case.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ func GetConvertToLowerCaseCmd() *cobra.Command {
1212
cmd := &cobra.Command{
1313
Use: "to_lower_case [text]",
1414
Aliases: []string{"lowercase"},
15-
Short: `Convert input into lower case.
15+
Short: "Convert input text into lower case.",
16+
Long: `Convert input text into lower case.
1617
Support pipe.`,
1718
Run: func(cmd *cobra.Command, args []string) {
1819
var err error

0 commit comments

Comments
 (0)