Skip to content

Commit a6c9a59

Browse files
refactor: rename commands functions
1 parent 90af547 commit a6c9a59

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

cmd/root.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,16 @@ func Execute() {
2323
rootCmd := &cobra.Command{ //nolint:exhaustruct,exhaustivestruct
2424
Use: "jwt",
2525
Short: "JWT Encoder and Decoder",
26-
Long: `Encode and Decode JWT Tokens`,
26+
Long: `Command and Command JWT Tokens`,
2727
}
2828
cmd.SetConfigFlag(rootCmd)
2929

3030
rootCmd.AddCommand(
31-
encode.Encode(),
32-
decode.Decode(),
33-
configure.Configure(),
31+
encode.Command(),
32+
decode.Command(),
33+
configure.Command(),
3434
edit.Command(),
35-
key.Key(),
35+
key.Command(),
3636
)
3737

3838
if err := rootCmd.Execute(); err != nil {

internal/cmd/configure/configure.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"github.com/spf13/cobra"
77
)
88

9-
func Configure() *cobra.Command {
9+
func Command() *cobra.Command {
1010
c := &cobra.Command{
1111
Use: "config",
1212
Short: "config jwt cli",

internal/cmd/decode/decode.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
"github.com/tidwall/pretty"
1313
)
1414

15-
func Decode() *cobra.Command {
15+
func Command() *cobra.Command {
1616
command := &cobra.Command{
1717
Use: "decode",
1818
Short: "decode jwt token",

internal/cmd/encode/encode.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
"github.com/spf13/cobra"
1313
)
1414

15-
func Encode() *cobra.Command {
15+
func Command() *cobra.Command {
1616
root := &cobra.Command{ //nolint:exhaustivestruct
1717
Use: "encode",
1818
Short: "Create JWT Token",

internal/cmd/key/key.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"github.com/spf13/cobra"
1111
)
1212

13-
func Key() *cobra.Command {
13+
func Command() *cobra.Command {
1414
c := &cobra.Command{
1515
Use: "key",
1616
Short: "generate different jwt keys",

0 commit comments

Comments
 (0)