Skip to content

Commit

Permalink
minor: bump package version up to v2 (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
titusjaka committed May 6, 2024
1 parent da099b6 commit e58dae3
Show file tree
Hide file tree
Showing 27 changed files with 52 additions and 52 deletions.
2 changes: 1 addition & 1 deletion commands/flags/slog.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log/slog"
"os"

"github.com/titusjaka/go-sample/internal/infrastructure/nopslog"
"github.com/titusjaka/go-sample/v2/internal/infrastructure/nopslog"
)

type Logger struct {
Expand Down
10 changes: 5 additions & 5 deletions commands/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import (
"fmt"
"log/slog"

"github.com/titusjaka/go-sample/commands/flags"
"github.com/titusjaka/go-sample/internal/infrastructure/postgres"
"github.com/titusjaka/go-sample/internal/infrastructure/postgres/pgmigrator"
"github.com/titusjaka/go-sample/internal/infrastructure/postgres/pgtest"
"github.com/titusjaka/go-sample/migrations"
"github.com/titusjaka/go-sample/v2/commands/flags"
"github.com/titusjaka/go-sample/v2/internal/infrastructure/postgres"
"github.com/titusjaka/go-sample/v2/internal/infrastructure/postgres/pgmigrator"
"github.com/titusjaka/go-sample/v2/internal/infrastructure/postgres/pgtest"
"github.com/titusjaka/go-sample/v2/migrations"
)

// MigrateCmd implements kong.Command for migrations. To use this command you need to add migrate.Command
Expand Down
10 changes: 5 additions & 5 deletions commands/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ import (
"github.com/go-chi/render"
"golang.org/x/sync/errgroup"

"github.com/titusjaka/go-sample/commands/flags"
"github.com/titusjaka/go-sample/internal/business/snippets"
"github.com/titusjaka/go-sample/internal/infrastructure/api"
"github.com/titusjaka/go-sample/internal/infrastructure/kongflag"
"github.com/titusjaka/go-sample/internal/infrastructure/postgres"
"github.com/titusjaka/go-sample/v2/commands/flags"
"github.com/titusjaka/go-sample/v2/internal/business/snippets"
"github.com/titusjaka/go-sample/v2/internal/infrastructure/api"
"github.com/titusjaka/go-sample/v2/internal/infrastructure/kongflag"
"github.com/titusjaka/go-sample/v2/internal/infrastructure/postgres"
)

// ServerCmd implements kong.Command for the main server command.
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/titusjaka/go-sample
module github.com/titusjaka/go-sample/v2

go 1.22

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

"github.com/titusjaka/go-sample/internal/business/snippets"
"github.com/titusjaka/go-sample/internal/infrastructure/utils/testutils"
"github.com/titusjaka/go-sample/v2/internal/business/snippets"
"github.com/titusjaka/go-sample/v2/internal/infrastructure/utils/testutils"
)

func TestCreateSnippetRequest_Validate(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion internal/business/snippets/entities_response.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package snippets
import (
"time"

"github.com/titusjaka/go-sample/internal/infrastructure/service"
"github.com/titusjaka/go-sample/v2/internal/infrastructure/service"
)

// SnippetResponse represents a common snippet-response struct
Expand Down
2 changes: 1 addition & 1 deletion internal/business/snippets/pagination.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"math"
"strings"

"github.com/titusjaka/go-sample/internal/infrastructure/service"
"github.com/titusjaka/go-sample/v2/internal/infrastructure/service"
)

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

"github.com/stretchr/testify/assert"

"github.com/titusjaka/go-sample/internal/business/snippets"
"github.com/titusjaka/go-sample/internal/infrastructure/service"
"github.com/titusjaka/go-sample/v2/internal/business/snippets"
"github.com/titusjaka/go-sample/v2/internal/infrastructure/service"
)

func TestNewPagination(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion internal/business/snippets/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"log/slog"
"time"

"github.com/titusjaka/go-sample/internal/infrastructure/service"
"github.com/titusjaka/go-sample/v2/internal/infrastructure/service"
)

//go:generate go run go.uber.org/mock/mockgen -typed -source=service.go -destination ./service_mock_test.go -package snippets_test -mock_names Storage=MockStorage
Expand Down
4 changes: 2 additions & 2 deletions internal/business/snippets/service_mock_test.go

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

6 changes: 3 additions & 3 deletions internal/business/snippets/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"

"github.com/titusjaka/go-sample/internal/business/snippets"
"github.com/titusjaka/go-sample/internal/infrastructure/nopslog"
"github.com/titusjaka/go-sample/internal/infrastructure/service"
"github.com/titusjaka/go-sample/v2/internal/business/snippets"
"github.com/titusjaka/go-sample/v2/internal/infrastructure/nopslog"
"github.com/titusjaka/go-sample/v2/internal/infrastructure/service"
)

func TestSnippetService_Create(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion internal/business/snippets/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"errors"
"fmt"

"github.com/titusjaka/go-sample/internal/infrastructure/service"
"github.com/titusjaka/go-sample/v2/internal/infrastructure/service"
)

// ErrNotFound error used to signal higher level about sql.ErrNoRows error
Expand Down
6 changes: 3 additions & 3 deletions internal/business/snippets/storage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/titusjaka/go-sample/internal/business/snippets"
"github.com/titusjaka/go-sample/internal/infrastructure/postgres/pgtest"
"github.com/titusjaka/go-sample/internal/infrastructure/service"
"github.com/titusjaka/go-sample/v2/internal/business/snippets"
"github.com/titusjaka/go-sample/v2/internal/infrastructure/postgres/pgtest"
"github.com/titusjaka/go-sample/v2/internal/infrastructure/service"
)

const envFile = "../../../.env"
Expand Down
4 changes: 2 additions & 2 deletions internal/business/snippets/transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"github.com/go-chi/render"
"github.com/gorilla/schema"

"github.com/titusjaka/go-sample/internal/infrastructure/api"
"github.com/titusjaka/go-sample/internal/infrastructure/service"
"github.com/titusjaka/go-sample/v2/internal/infrastructure/api"
"github.com/titusjaka/go-sample/v2/internal/infrastructure/service"
)

//go:generate go run go.uber.org/mock/mockgen -typed -source=transport.go -destination ./transport_mock_test.go -package snippets_test -mock_names Service=MockService
Expand Down
4 changes: 2 additions & 2 deletions internal/business/snippets/transport_mock_test.go

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

6 changes: 3 additions & 3 deletions internal/business/snippets/transport_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"github.com/gavv/httpexpect/v2"
"go.uber.org/mock/gomock"

"github.com/titusjaka/go-sample/internal/business/snippets"
"github.com/titusjaka/go-sample/internal/infrastructure/nopslog"
"github.com/titusjaka/go-sample/internal/infrastructure/service"
"github.com/titusjaka/go-sample/v2/internal/business/snippets"
"github.com/titusjaka/go-sample/v2/internal/infrastructure/nopslog"
"github.com/titusjaka/go-sample/v2/internal/infrastructure/service"
)

func TestTransport_listSnippets(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions internal/infrastructure/api/authentication_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/titusjaka/go-sample/internal/infrastructure/api"
"github.com/titusjaka/go-sample/internal/infrastructure/nopslog"
"github.com/titusjaka/go-sample/v2/internal/infrastructure/api"
"github.com/titusjaka/go-sample/v2/internal/infrastructure/nopslog"
)

func TestApi_InternalCommunication(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions internal/infrastructure/api/middleware_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/titusjaka/go-sample/internal/infrastructure/api"
"github.com/titusjaka/go-sample/internal/infrastructure/nopslog"
"github.com/titusjaka/go-sample/v2/internal/infrastructure/api"
"github.com/titusjaka/go-sample/v2/internal/infrastructure/nopslog"
)

func TestApi_NotFoundHandler(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion internal/infrastructure/api/response.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/go-chi/render"

"github.com/titusjaka/go-sample/internal/infrastructure/service"
"github.com/titusjaka/go-sample/v2/internal/infrastructure/service"
)

// ErrResponse renderer type for handling all sorts of business errors.
Expand Down
4 changes: 2 additions & 2 deletions internal/infrastructure/api/response_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (

"github.com/stretchr/testify/assert"

"github.com/titusjaka/go-sample/internal/infrastructure/api"
"github.com/titusjaka/go-sample/internal/infrastructure/service"
"github.com/titusjaka/go-sample/v2/internal/infrastructure/api"
"github.com/titusjaka/go-sample/v2/internal/infrastructure/service"
)

func TestNewErrResponse(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion internal/infrastructure/postgres/pgtest/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"io/fs"

"github.com/titusjaka/go-sample/internal/infrastructure/postgres/pgmigrator"
"github.com/titusjaka/go-sample/v2/internal/infrastructure/postgres/pgmigrator"
)

func CreateTemplateDatabase(flags Flags, migrations fs.FS) error {
Expand Down
2 changes: 1 addition & 1 deletion internal/infrastructure/postgres/pgtest/flags.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package pgtest

import (
"github.com/titusjaka/go-sample/internal/infrastructure/postgres"
"github.com/titusjaka/go-sample/v2/internal/infrastructure/postgres"
)

type Flags struct {
Expand Down
2 changes: 1 addition & 1 deletion internal/infrastructure/postgres/pgtest/postgresql.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (

kongdotenv "github.com/titusjaka/kong-dotenv-go"

"github.com/titusjaka/go-sample/internal/infrastructure/postgres/pgmigrator"
"github.com/titusjaka/go-sample/v2/internal/infrastructure/postgres/pgmigrator"
)

// InitTestDatabase creates initializes a new dummy database in s PostgreSQL server
Expand Down
4 changes: 2 additions & 2 deletions internal/infrastructure/postgres/pgtest/postgresql_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (

"github.com/stretchr/testify/assert"

"github.com/titusjaka/go-sample/internal/infrastructure/postgres/pgtest"
"github.com/titusjaka/go-sample/internal/infrastructure/postgres/pgtest/testdata"
"github.com/titusjaka/go-sample/v2/internal/infrastructure/postgres/pgtest"
"github.com/titusjaka/go-sample/v2/internal/infrastructure/postgres/pgtest/testdata"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion internal/infrastructure/service/errors_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/stretchr/testify/assert"

"github.com/titusjaka/go-sample/internal/infrastructure/service"
"github.com/titusjaka/go-sample/v2/internal/infrastructure/service"
)

func TestError_Error(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (

kongdotenv "github.com/titusjaka/kong-dotenv-go"

"github.com/titusjaka/go-sample/commands"
"github.com/titusjaka/go-sample/internal/infrastructure/kongflag"
"github.com/titusjaka/go-sample/v2/commands"
"github.com/titusjaka/go-sample/v2/internal/infrastructure/kongflag"
)

type App struct {
Expand Down
4 changes: 2 additions & 2 deletions main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (

kongdotenv "github.com/titusjaka/kong-dotenv-go"

"github.com/titusjaka/go-sample/internal/infrastructure/postgres/pgtest"
"github.com/titusjaka/go-sample/migrations"
"github.com/titusjaka/go-sample/v2/internal/infrastructure/postgres/pgtest"
"github.com/titusjaka/go-sample/v2/migrations"
)

func TestMain(m *testing.M) {
Expand Down

0 comments on commit e58dae3

Please sign in to comment.