Skip to content

Commit

Permalink
feat: update to v2
Browse files Browse the repository at this point in the history
  • Loading branch information
mehditeymorian committed Jun 6, 2023
1 parent 1ea8f6d commit 6dc2568
Show file tree
Hide file tree
Showing 14 changed files with 35 additions and 35 deletions.
10 changes: 5 additions & 5 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ package cmd
import (
"os"

"github.com/mehditeymorian/jwt/internal/cmd"
"github.com/mehditeymorian/jwt/internal/cmd/config"
"github.com/mehditeymorian/jwt/internal/cmd/decode"
"github.com/mehditeymorian/jwt/internal/cmd/encode"
"github.com/mehditeymorian/jwt/internal/cmd/gen"
"github.com/mehditeymorian/jwt/v2/internal/cmd"
"github.com/mehditeymorian/jwt/v2/internal/cmd/config"
"github.com/mehditeymorian/jwt/v2/internal/cmd/decode"
"github.com/mehditeymorian/jwt/v2/internal/cmd/encode"
"github.com/mehditeymorian/jwt/v2/internal/cmd/gen"
"github.com/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/mehditeymorian/jwt
module github.com/mehditeymorian/jwt/v2

go 1.18

Expand Down
8 changes: 4 additions & 4 deletions internal/cmd/config/config.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package config

import (
"github.com/mehditeymorian/jwt/internal/cmd"
"github.com/mehditeymorian/jwt/internal/cmd/config/edit"
"github.com/mehditeymorian/jwt/internal/cmd/config/set"
"github.com/mehditeymorian/jwt/internal/config"
"github.com/mehditeymorian/jwt/v2/internal/cmd"
"github.com/mehditeymorian/jwt/v2/internal/cmd/config/edit"
"github.com/mehditeymorian/jwt/v2/internal/cmd/config/set"
"github.com/mehditeymorian/jwt/v2/internal/config"
"github.com/spf13/cobra"
)

Expand Down
4 changes: 2 additions & 2 deletions internal/cmd/config/edit/edit.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"os"
"os/exec"

"github.com/mehditeymorian/jwt/internal/cmd"
"github.com/mehditeymorian/jwt/internal/config"
"github.com/mehditeymorian/jwt/v2/internal/cmd"
"github.com/mehditeymorian/jwt/v2/internal/config"
"github.com/spf13/cobra"
)

Expand Down
4 changes: 2 additions & 2 deletions internal/cmd/config/set/set.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"strconv"
"strings"

"github.com/mehditeymorian/jwt/internal/cmd"
"github.com/mehditeymorian/jwt/internal/config"
"github.com/mehditeymorian/jwt/v2/internal/cmd"
"github.com/mehditeymorian/jwt/v2/internal/config"
"github.com/pterm/pterm"
"github.com/spf13/cobra"
)
Expand Down
6 changes: 3 additions & 3 deletions internal/cmd/decode/decode.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (

"github.com/AlecAivazis/survey/v2"
jwtlib "github.com/golang-jwt/jwt/v4"
"github.com/mehditeymorian/jwt/internal/cmd"
"github.com/mehditeymorian/jwt/internal/config"
"github.com/mehditeymorian/jwt/internal/jwt"
"github.com/mehditeymorian/jwt/v2/internal/cmd"
"github.com/mehditeymorian/jwt/v2/internal/config"
"github.com/mehditeymorian/jwt/v2/internal/jwt"
"github.com/pterm/pterm"
"github.com/spf13/cobra"
"github.com/tidwall/pretty"
Expand Down
8 changes: 4 additions & 4 deletions internal/cmd/encode/encode.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package encode

import (
"github.com/mehditeymorian/jwt/internal/cmd"
"github.com/mehditeymorian/jwt/internal/config"
"github.com/mehditeymorian/jwt/internal/jwt"
"github.com/mehditeymorian/jwt/internal/model"
"github.com/mehditeymorian/jwt/v2/internal/cmd"
"github.com/mehditeymorian/jwt/v2/internal/config"
"github.com/mehditeymorian/jwt/v2/internal/jwt"
"github.com/mehditeymorian/jwt/v2/internal/model"
"github.com/pterm/pterm"

"github.com/AlecAivazis/survey/v2"
Expand Down
6 changes: 3 additions & 3 deletions internal/cmd/gen/ecdsa.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package gen
import (
"fmt"
"github.com/AlecAivazis/survey/v2"
"github.com/mehditeymorian/jwt/internal/cmd"
"github.com/mehditeymorian/jwt/internal/config"
keyGenerator "github.com/mehditeymorian/jwt/internal/key"
"github.com/mehditeymorian/jwt/v2/internal/cmd"
"github.com/mehditeymorian/jwt/v2/internal/config"
keyGenerator "github.com/mehditeymorian/jwt/v2/internal/key"
"github.com/pterm/pterm"
"github.com/spf13/cobra"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/gen/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package gen
import (
"os"

"github.com/mehditeymorian/jwt/internal/cmd"
"github.com/mehditeymorian/jwt/v2/internal/cmd"
"github.com/pterm/pterm"
"github.com/spf13/cobra"
)
Expand Down
6 changes: 3 additions & 3 deletions internal/cmd/gen/hmac.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"strconv"

"github.com/AlecAivazis/survey/v2"
"github.com/mehditeymorian/jwt/internal/cmd"
"github.com/mehditeymorian/jwt/internal/config"
keyGenerator "github.com/mehditeymorian/jwt/internal/key"
"github.com/mehditeymorian/jwt/v2/internal/cmd"
"github.com/mehditeymorian/jwt/v2/internal/config"
keyGenerator "github.com/mehditeymorian/jwt/v2/internal/key"
"github.com/pterm/pterm"
"github.com/spf13/cobra"
)
Expand Down
6 changes: 3 additions & 3 deletions internal/cmd/gen/rsa.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"strconv"

"github.com/AlecAivazis/survey/v2"
"github.com/mehditeymorian/jwt/internal/cmd"
"github.com/mehditeymorian/jwt/internal/config"
keyGenerator "github.com/mehditeymorian/jwt/internal/key"
"github.com/mehditeymorian/jwt/v2/internal/cmd"
"github.com/mehditeymorian/jwt/v2/internal/config"
keyGenerator "github.com/mehditeymorian/jwt/v2/internal/key"
"github.com/pterm/pterm"
"github.com/spf13/cobra"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/config/key.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"regexp"

"github.com/golang-jwt/jwt/v4"
keyGenerator "github.com/mehditeymorian/jwt/internal/key"
keyGenerator "github.com/mehditeymorian/jwt/v2/internal/key"
"github.com/pterm/pterm"
)

Expand Down
4 changes: 2 additions & 2 deletions internal/jwt/jwt.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"time"

"github.com/golang-jwt/jwt/v4"
"github.com/mehditeymorian/jwt/internal/config"
"github.com/mehditeymorian/jwt/internal/model"
"github.com/mehditeymorian/jwt/v2/internal/config"
"github.com/mehditeymorian/jwt/v2/internal/model"
)

func Encode(encode model.Encode, key any) (string, error) {
Expand Down
2 changes: 1 addition & 1 deletion jwt.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Copyright © 2022 Mehdi Teymorian
*/
package main

import "github.com/mehditeymorian/jwt/cmd"
import "github.com/mehditeymorian/jwt/v2/cmd"

func main() {
cmd.Execute()
Expand Down

0 comments on commit 6dc2568

Please sign in to comment.