Skip to content

Commit

Permalink
🔨refactor: Update package import paths to use v2 module
Browse files Browse the repository at this point in the history
- change all import paths from `github.com/yanosea/jrp`
  to `github.com/yanosea/jrp/v2` to align with new major version
- modify package paths in:
  - application layer
  - infrastructure layer
  - presentation layer
  - utility package
- this change supports proper versioning according
  to semantic versioning principles for Go modules
  • Loading branch information
yanosea committed Jan 23, 2025
1 parent d467a08 commit 242a344
Show file tree
Hide file tree
Showing 101 changed files with 246 additions and 246 deletions.
4 changes: 2 additions & 2 deletions app/application/jrp/download_usecase.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package jrp
import (
"errors"

"github.com/yanosea/jrp/pkg/proxy"
"github.com/yanosea/jrp/pkg/utility"
"github.com/yanosea/jrp/v2/pkg/proxy"
"github.com/yanosea/jrp/v2/pkg/utility"
)

// downloadUseCase is a struct that contains the use case of the download.
Expand Down
4 changes: 2 additions & 2 deletions app/application/jrp/download_usecase_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"reflect"
"testing"

"github.com/yanosea/jrp/pkg/proxy"
"github.com/yanosea/jrp/pkg/utility"
"github.com/yanosea/jrp/v2/pkg/proxy"
"github.com/yanosea/jrp/v2/pkg/utility"

"go.uber.org/mock/gomock"
)
Expand Down
2 changes: 1 addition & 1 deletion app/application/jrp/favorite_usecase.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"errors"

historyDomain "github.com/yanosea/jrp/app/domain/jrp/history"
historyDomain "github.com/yanosea/jrp/v2/app/domain/jrp/history"
)

// favoriteUseCase is a struct that contains the use case of the favoriting jrp from the table history in jrp sqlite database.
Expand Down
2 changes: 1 addition & 1 deletion app/application/jrp/favorite_usecase_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"reflect"
"testing"

historyDomain "github.com/yanosea/jrp/app/domain/jrp/history"
historyDomain "github.com/yanosea/jrp/v2/app/domain/jrp/history"

"go.uber.org/mock/gomock"
)
Expand Down
4 changes: 2 additions & 2 deletions app/application/jrp/generate_jrp_usecase.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package jrp
import (
"time"

"github.com/yanosea/jrp/pkg/proxy"
"github.com/yanosea/jrp/pkg/utility"
"github.com/yanosea/jrp/v2/pkg/proxy"
"github.com/yanosea/jrp/v2/pkg/utility"
)

// generateJrpUseCase is a struct that contains the use case of the generation jrp.
Expand Down
2 changes: 1 addition & 1 deletion app/application/jrp/generate_jrp_usecase_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"reflect"
"testing"

"github.com/yanosea/jrp/pkg/utility"
"github.com/yanosea/jrp/v2/pkg/utility"

"go.uber.org/mock/gomock"
)
Expand Down
2 changes: 1 addition & 1 deletion app/application/jrp/get_history_usecase.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"time"

historyDomain "github.com/yanosea/jrp/app/domain/jrp/history"
historyDomain "github.com/yanosea/jrp/v2/app/domain/jrp/history"
)

// getHistoryUseCase is a struct that contains the use case of the getting jrp from the table history in jrp sqlite database.
Expand Down
2 changes: 1 addition & 1 deletion app/application/jrp/get_history_usecase_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"reflect"
"testing"

historyDomain "github.com/yanosea/jrp/app/domain/jrp/history"
historyDomain "github.com/yanosea/jrp/v2/app/domain/jrp/history"

"go.uber.org/mock/gomock"
)
Expand Down
2 changes: 1 addition & 1 deletion app/application/jrp/remove_history_usecase.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"errors"

historyDomain "github.com/yanosea/jrp/app/domain/jrp/history"
historyDomain "github.com/yanosea/jrp/v2/app/domain/jrp/history"
)

// removeHistoryUseCase is a struct that contains the use case of the removing jrp from the table history in jrp sqlite database.
Expand Down
2 changes: 1 addition & 1 deletion app/application/jrp/remove_history_usecase_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"reflect"
"testing"

historyDomain "github.com/yanosea/jrp/app/domain/jrp/history"
historyDomain "github.com/yanosea/jrp/v2/app/domain/jrp/history"
"go.uber.org/mock/gomock"
)

Expand Down
2 changes: 1 addition & 1 deletion app/application/jrp/save_history_usecase.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"time"

historyDomain "github.com/yanosea/jrp/app/domain/jrp/history"
historyDomain "github.com/yanosea/jrp/v2/app/domain/jrp/history"
)

// saveHistoryUseCase is a struct that contains the use case of the saving jrp to the table history in jrp sqlite database.
Expand Down
2 changes: 1 addition & 1 deletion app/application/jrp/save_history_usecase_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"reflect"
"testing"

historyDomain "github.com/yanosea/jrp/app/domain/jrp/history"
historyDomain "github.com/yanosea/jrp/v2/app/domain/jrp/history"

"go.uber.org/mock/gomock"
)
Expand Down
2 changes: 1 addition & 1 deletion app/application/jrp/search_history_usecase.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"time"

historyDomain "github.com/yanosea/jrp/app/domain/jrp/history"
historyDomain "github.com/yanosea/jrp/v2/app/domain/jrp/history"
)

// searchHistoryUseCase is a struct that contains the use case of the searching jrp from the table history in jrp sqlite database.
Expand Down
2 changes: 1 addition & 1 deletion app/application/jrp/search_history_usecase_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"reflect"
"testing"

historyDomain "github.com/yanosea/jrp/app/domain/jrp/history"
historyDomain "github.com/yanosea/jrp/v2/app/domain/jrp/history"

"go.uber.org/mock/gomock"
)
Expand Down
2 changes: 1 addition & 1 deletion app/application/jrp/unfavorite_usecase.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"errors"

historyDomain "github.com/yanosea/jrp/app/domain/jrp/history"
historyDomain "github.com/yanosea/jrp/v2/app/domain/jrp/history"
)

// unfavoriteUseCase is a struct that contains the use case of the unfavoriting jrp from the table history in jrp sqlite database.
Expand Down
2 changes: 1 addition & 1 deletion app/application/jrp/unfavorite_usecase_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"reflect"
"testing"

historyDomain "github.com/yanosea/jrp/app/domain/jrp/history"
historyDomain "github.com/yanosea/jrp/v2/app/domain/jrp/history"

"go.uber.org/mock/gomock"
)
Expand Down
6 changes: 3 additions & 3 deletions app/config/config.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package config

import (
"github.com/yanosea/jrp/app/infrastructure/database"
"github.com/yanosea/jrp/v2/app/infrastructure/database"

"github.com/yanosea/jrp/pkg/proxy"
"github.com/yanosea/jrp/pkg/utility"
"github.com/yanosea/jrp/v2/pkg/proxy"
"github.com/yanosea/jrp/v2/pkg/utility"
)

// Configurator is an interface that gets the configuration.
Expand Down
4 changes: 2 additions & 2 deletions app/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"reflect"
"testing"

"github.com/yanosea/jrp/pkg/proxy"
"github.com/yanosea/jrp/pkg/utility"
"github.com/yanosea/jrp/v2/pkg/proxy"
"github.com/yanosea/jrp/v2/pkg/utility"
)

func TestNewConfigurator(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion app/infrastructure/database/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package database
import (
"sync"

"github.com/yanosea/jrp/pkg/proxy"
"github.com/yanosea/jrp/v2/pkg/proxy"
)

// DBConnection is an interface that contains the database connection.
Expand Down
2 changes: 1 addition & 1 deletion app/infrastructure/database/connection_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"errors"
"sync"

"github.com/yanosea/jrp/pkg/proxy"
"github.com/yanosea/jrp/v2/pkg/proxy"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion app/infrastructure/database/connection_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"sync"
"testing"

"github.com/yanosea/jrp/pkg/proxy"
"github.com/yanosea/jrp/v2/pkg/proxy"
"go.uber.org/mock/gomock"
)

Expand Down
2 changes: 1 addition & 1 deletion app/infrastructure/database/connection_mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion app/infrastructure/database/connection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"sync"
"testing"

"github.com/yanosea/jrp/pkg/proxy"
"github.com/yanosea/jrp/v2/pkg/proxy"

"go.uber.org/mock/gomock"
)
Expand Down
6 changes: 3 additions & 3 deletions app/infrastructure/jrp/repository/history_repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
"fmt"
"strings"

"github.com/yanosea/jrp/app/domain/jrp/history"
"github.com/yanosea/jrp/app/infrastructure/database"
"github.com/yanosea/jrp/v2/app/domain/jrp/history"
"github.com/yanosea/jrp/v2/app/infrastructure/database"

"github.com/yanosea/jrp/pkg/proxy"
"github.com/yanosea/jrp/v2/pkg/proxy"
)

// HistoryRepository is a struct that implements the HistoryRepository interface.
Expand Down
6 changes: 3 additions & 3 deletions app/infrastructure/jrp/repository/history_repository_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import (
"testing"
"time"

historyDomain "github.com/yanosea/jrp/app/domain/jrp/history"
"github.com/yanosea/jrp/app/infrastructure/database"
historyDomain "github.com/yanosea/jrp/v2/app/domain/jrp/history"
"github.com/yanosea/jrp/v2/app/infrastructure/database"

"github.com/yanosea/jrp/pkg/proxy"
"github.com/yanosea/jrp/v2/pkg/proxy"

"go.uber.org/mock/gomock"
)
Expand Down
4 changes: 2 additions & 2 deletions app/infrastructure/wnjpn/query_service/word_query_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"fmt"
"strings"

"github.com/yanosea/jrp/app/application/wnjpn"
"github.com/yanosea/jrp/app/infrastructure/database"
"github.com/yanosea/jrp/v2/app/application/wnjpn"
"github.com/yanosea/jrp/v2/app/infrastructure/database"
)

// WordQueryService is a struct that implements the WordQueryService interface.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import (
"reflect"
"testing"

jrpApp "github.com/yanosea/jrp/app/application/jrp"
wnjpnApp "github.com/yanosea/jrp/app/application/wnjpn"
"github.com/yanosea/jrp/app/infrastructure/database"
jrpApp "github.com/yanosea/jrp/v2/app/application/jrp"
wnjpnApp "github.com/yanosea/jrp/v2/app/application/wnjpn"
"github.com/yanosea/jrp/v2/app/infrastructure/database"

"github.com/yanosea/jrp/pkg/proxy"
"github.com/yanosea/jrp/v2/pkg/proxy"

"go.uber.org/mock/gomock"
)
Expand Down
12 changes: 6 additions & 6 deletions app/presentation/cli/jrp/command/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import (
"context"
"os"

"github.com/yanosea/jrp/app/infrastructure/database"
"github.com/yanosea/jrp/app/presentation/cli/jrp/config"
"github.com/yanosea/jrp/app/presentation/cli/jrp/formatter"
"github.com/yanosea/jrp/app/presentation/cli/jrp/presenter"
"github.com/yanosea/jrp/v2/app/infrastructure/database"
"github.com/yanosea/jrp/v2/app/presentation/cli/jrp/config"
"github.com/yanosea/jrp/v2/app/presentation/cli/jrp/formatter"
"github.com/yanosea/jrp/v2/app/presentation/cli/jrp/presenter"

"github.com/yanosea/jrp/pkg/proxy"
"github.com/yanosea/jrp/pkg/utility"
"github.com/yanosea/jrp/v2/pkg/proxy"
"github.com/yanosea/jrp/v2/pkg/utility"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions app/presentation/cli/jrp/command/command_mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions app/presentation/cli/jrp/command/command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import (

"github.com/fatih/color"

jrpApp "github.com/yanosea/jrp/app/application/jrp"
"github.com/yanosea/jrp/app/infrastructure/database"
"github.com/yanosea/jrp/pkg/proxy"
"github.com/yanosea/jrp/pkg/utility"
jrpApp "github.com/yanosea/jrp/v2/app/application/jrp"
"github.com/yanosea/jrp/v2/app/infrastructure/database"
"github.com/yanosea/jrp/v2/pkg/proxy"
"github.com/yanosea/jrp/v2/pkg/utility"
"go.uber.org/mock/gomock"
)

Expand Down
2 changes: 1 addition & 1 deletion app/presentation/cli/jrp/command/jrp/completion/bash.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

c "github.com/spf13/cobra"

"github.com/yanosea/jrp/pkg/proxy"
"github.com/yanosea/jrp/v2/pkg/proxy"
)

// NewCompletionBashCommand returns a new instance of the completion bash command.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

c "github.com/spf13/cobra"

"github.com/yanosea/jrp/pkg/proxy"
"github.com/yanosea/jrp/v2/pkg/proxy"
)

func TestNewCompletionBashCommand(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package completion

import (
"github.com/yanosea/jrp/pkg/proxy"
"github.com/yanosea/jrp/v2/pkg/proxy"
)

// NewCompletionCommand returns a new instance of the completion command.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package completion
import (
"testing"

"github.com/yanosea/jrp/pkg/proxy"
"github.com/yanosea/jrp/v2/pkg/proxy"
)

func TestNewCompletionCommand(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion app/presentation/cli/jrp/command/jrp/completion/fish.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

c "github.com/spf13/cobra"

"github.com/yanosea/jrp/pkg/proxy"
"github.com/yanosea/jrp/v2/pkg/proxy"
)

// NewCompletionFishCommand returns a new instance of the completion fish command.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

c "github.com/spf13/cobra"

"github.com/yanosea/jrp/pkg/proxy"
"github.com/yanosea/jrp/v2/pkg/proxy"
)

func TestNewCompletionFishCommand(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

c "github.com/spf13/cobra"

"github.com/yanosea/jrp/pkg/proxy"
"github.com/yanosea/jrp/v2/pkg/proxy"
)

// NewCompletionPowerShellCommand returns a new instance of the completion powershell command.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

c "github.com/spf13/cobra"

"github.com/yanosea/jrp/pkg/proxy"
"github.com/yanosea/jrp/v2/pkg/proxy"
)

func TestNewCompletionPowerShellCommand(t *testing.T) {
Expand Down
Loading

0 comments on commit 242a344

Please sign in to comment.