Skip to content

Commit

Permalink
refactor: rename commands functions
Browse files Browse the repository at this point in the history
  • Loading branch information
mehditeymorian committed Aug 31, 2022
1 parent 90af547 commit a6c9a59
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ func Execute() {
rootCmd := &cobra.Command{ //nolint:exhaustruct,exhaustivestruct
Use: "jwt",
Short: "JWT Encoder and Decoder",
Long: `Encode and Decode JWT Tokens`,
Long: `Command and Command JWT Tokens`,
}
cmd.SetConfigFlag(rootCmd)

rootCmd.AddCommand(
encode.Encode(),
decode.Decode(),
configure.Configure(),
encode.Command(),
decode.Command(),
configure.Command(),
edit.Command(),
key.Key(),
key.Command(),
)

if err := rootCmd.Execute(); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/configure/configure.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/spf13/cobra"
)

func Configure() *cobra.Command {
func Command() *cobra.Command {
c := &cobra.Command{
Use: "config",
Short: "config jwt cli",
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/decode/decode.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/tidwall/pretty"
)

func Decode() *cobra.Command {
func Command() *cobra.Command {
command := &cobra.Command{
Use: "decode",
Short: "decode jwt token",
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/encode/encode.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/spf13/cobra"
)

func Encode() *cobra.Command {
func Command() *cobra.Command {
root := &cobra.Command{ //nolint:exhaustivestruct
Use: "encode",
Short: "Create JWT Token",
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/key/key.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/spf13/cobra"
)

func Key() *cobra.Command {
func Command() *cobra.Command {
c := &cobra.Command{
Use: "key",
Short: "generate different jwt keys",
Expand Down

0 comments on commit a6c9a59

Please sign in to comment.