diff --git a/examples/cqrs/cmd/main.go b/examples/cqrs/cmd/main.go
index d4c3d2f..16919c5 100644
--- a/examples/cqrs/cmd/main.go
+++ b/examples/cqrs/cmd/main.go
@@ -2,16 +2,16 @@ package main
import (
"context"
- "github.com/mehdihadeli/mediatr"
- "github.com/mehdihadeli/mediatr/examples/cqrs/docs"
- productApi "github.com/mehdihadeli/mediatr/examples/cqrs/internal/products/api"
- "github.com/mehdihadeli/mediatr/examples/cqrs/internal/products/features/creating_product/commands"
- creatingProductsDtos "github.com/mehdihadeli/mediatr/examples/cqrs/internal/products/features/creating_product/dtos"
- "github.com/mehdihadeli/mediatr/examples/cqrs/internal/products/features/creating_product/events"
- gettingProductByIdDtos "github.com/mehdihadeli/mediatr/examples/cqrs/internal/products/features/getting_product_by_id/dtos"
- "github.com/mehdihadeli/mediatr/examples/cqrs/internal/products/features/getting_product_by_id/queries"
- "github.com/mehdihadeli/mediatr/examples/cqrs/internal/products/repository"
- "github.com/mehdihadeli/mediatr/examples/cqrs/internal/shared/behaviours"
+ "github.com/mehdihadeli/go-mediatr"
+ "github.com/mehdihadeli/go-mediatr/examples/cqrs/docs"
+ productApi "github.com/mehdihadeli/go-mediatr/examples/cqrs/internal/products/api"
+ "github.com/mehdihadeli/go-mediatr/examples/cqrs/internal/products/features/creating_product/commands"
+ creatingProductsDtos "github.com/mehdihadeli/go-mediatr/examples/cqrs/internal/products/features/creating_product/dtos"
+ "github.com/mehdihadeli/go-mediatr/examples/cqrs/internal/products/features/creating_product/events"
+ gettingProductByIdDtos "github.com/mehdihadeli/go-mediatr/examples/cqrs/internal/products/features/getting_product_by_id/dtos"
+ "github.com/mehdihadeli/go-mediatr/examples/cqrs/internal/products/features/getting_product_by_id/queries"
+ "github.com/mehdihadeli/go-mediatr/examples/cqrs/internal/products/repository"
+ "github.com/mehdihadeli/go-mediatr/examples/cqrs/internal/shared/behaviours"
"log"
"os"
"os/signal"
diff --git a/examples/cqrs/internal/products/api/products_controller.go b/examples/cqrs/internal/products/api/products_controller.go
index 87e1c18..048a968 100644
--- a/examples/cqrs/internal/products/api/products_controller.go
+++ b/examples/cqrs/internal/products/api/products_controller.go
@@ -1,11 +1,11 @@
package api
import (
- "github.com/mehdihadeli/mediatr"
- "github.com/mehdihadeli/mediatr/examples/cqrs/internal/products/features/creating_product/commands"
- creatingProductsDtos "github.com/mehdihadeli/mediatr/examples/cqrs/internal/products/features/creating_product/dtos"
- gettingProductByIdDtos "github.com/mehdihadeli/mediatr/examples/cqrs/internal/products/features/getting_product_by_id/dtos"
- "github.com/mehdihadeli/mediatr/examples/cqrs/internal/products/features/getting_product_by_id/queries"
+ "github.com/mehdihadeli/go-mediatr"
+ "github.com/mehdihadeli/go-mediatr/examples/cqrs/internal/products/features/creating_product/commands"
+ creatingProductsDtos "github.com/mehdihadeli/go-mediatr/examples/cqrs/internal/products/features/creating_product/dtos"
+ gettingProductByIdDtos "github.com/mehdihadeli/go-mediatr/examples/cqrs/internal/products/features/getting_product_by_id/dtos"
+ "github.com/mehdihadeli/go-mediatr/examples/cqrs/internal/products/features/getting_product_by_id/queries"
"net/http"
"github.com/go-playground/validator"
diff --git a/examples/cqrs/internal/products/features/creating_product/commands/create_product_handler.go b/examples/cqrs/internal/products/features/creating_product/commands/create_product_handler.go
index f9624a8..5818bf0 100644
--- a/examples/cqrs/internal/products/features/creating_product/commands/create_product_handler.go
+++ b/examples/cqrs/internal/products/features/creating_product/commands/create_product_handler.go
@@ -2,11 +2,11 @@ package commands
import (
"context"
- "github.com/mehdihadeli/mediatr"
- creatingProductDtos "github.com/mehdihadeli/mediatr/examples/cqrs/internal/products/features/creating_product/dtos"
- "github.com/mehdihadeli/mediatr/examples/cqrs/internal/products/features/creating_product/events"
- "github.com/mehdihadeli/mediatr/examples/cqrs/internal/products/models"
- "github.com/mehdihadeli/mediatr/examples/cqrs/internal/products/repository"
+ "github.com/mehdihadeli/go-mediatr"
+ creatingProductDtos "github.com/mehdihadeli/go-mediatr/examples/cqrs/internal/products/features/creating_product/dtos"
+ "github.com/mehdihadeli/go-mediatr/examples/cqrs/internal/products/features/creating_product/events"
+ "github.com/mehdihadeli/go-mediatr/examples/cqrs/internal/products/models"
+ "github.com/mehdihadeli/go-mediatr/examples/cqrs/internal/products/repository"
)
type CreateProductCommandHandler struct {
diff --git a/examples/cqrs/internal/products/features/getting_product_by_id/dtos/get_product_by_id_response.go b/examples/cqrs/internal/products/features/getting_product_by_id/dtos/get_product_by_id_response.go
index 25517f5..61a6ca7 100644
--- a/examples/cqrs/internal/products/features/getting_product_by_id/dtos/get_product_by_id_response.go
+++ b/examples/cqrs/internal/products/features/getting_product_by_id/dtos/get_product_by_id_response.go
@@ -1,7 +1,7 @@
package dtos
import (
- "github.com/mehdihadeli/mediatr/examples/cqrs/internal/products/dtos"
+ "github.com/mehdihadeli/go-mediatr/examples/cqrs/internal/products/dtos"
)
type GetProductByIdQueryResponse struct {
diff --git a/examples/cqrs/internal/products/features/getting_product_by_id/queries/get_product_by_id_handler.go b/examples/cqrs/internal/products/features/getting_product_by_id/queries/get_product_by_id_handler.go
index e20d42a..824de1c 100644
--- a/examples/cqrs/internal/products/features/getting_product_by_id/queries/get_product_by_id_handler.go
+++ b/examples/cqrs/internal/products/features/getting_product_by_id/queries/get_product_by_id_handler.go
@@ -3,9 +3,9 @@ package queries
import (
"context"
"fmt"
- "github.com/mehdihadeli/mediatr/examples/cqrs/internal/products"
- gettingProductByIdDtos "github.com/mehdihadeli/mediatr/examples/cqrs/internal/products/features/getting_product_by_id/dtos"
- "github.com/mehdihadeli/mediatr/examples/cqrs/internal/products/repository"
+ "github.com/mehdihadeli/go-mediatr/examples/cqrs/internal/products"
+ gettingProductByIdDtos "github.com/mehdihadeli/go-mediatr/examples/cqrs/internal/products/features/getting_product_by_id/dtos"
+ "github.com/mehdihadeli/go-mediatr/examples/cqrs/internal/products/repository"
"github.com/pkg/errors"
)
diff --git a/examples/cqrs/internal/products/mapper.go b/examples/cqrs/internal/products/mapper.go
index 2844e35..53710b2 100644
--- a/examples/cqrs/internal/products/mapper.go
+++ b/examples/cqrs/internal/products/mapper.go
@@ -1,8 +1,8 @@
package products
import (
- "github.com/mehdihadeli/mediatr/examples/cqrs/internal/products/dtos"
- "github.com/mehdihadeli/mediatr/examples/cqrs/internal/products/models"
+ "github.com/mehdihadeli/go-mediatr/examples/cqrs/internal/products/dtos"
+ "github.com/mehdihadeli/go-mediatr/examples/cqrs/internal/products/models"
)
func MapProductToProductDto(product *models.Product) *dtos.ProductDto {
diff --git a/examples/cqrs/internal/products/repository/inmemory_product_repository.go b/examples/cqrs/internal/products/repository/inmemory_product_repository.go
index 40091ce..6d0c824 100644
--- a/examples/cqrs/internal/products/repository/inmemory_product_repository.go
+++ b/examples/cqrs/internal/products/repository/inmemory_product_repository.go
@@ -2,7 +2,7 @@ package repository
import (
"context"
- "github.com/mehdihadeli/mediatr/examples/cqrs/internal/products/models"
+ "github.com/mehdihadeli/go-mediatr/examples/cqrs/internal/products/models"
uuid "github.com/satori/go.uuid"
)
diff --git a/examples/cqrs/internal/shared/behaviours/request_logger_behaviour.go b/examples/cqrs/internal/shared/behaviours/request_logger_behaviour.go
index d7e3ece..6920cda 100644
--- a/examples/cqrs/internal/shared/behaviours/request_logger_behaviour.go
+++ b/examples/cqrs/internal/shared/behaviours/request_logger_behaviour.go
@@ -2,7 +2,7 @@ package behaviours
import (
"context"
- "github.com/mehdihadeli/mediatr"
+ "github.com/mehdihadeli/go-mediatr"
"log"
)
diff --git a/go.mod b/go.mod
index 9de53c1..5c2ba41 100644
--- a/go.mod
+++ b/go.mod
@@ -1,4 +1,4 @@
-module github.com/mehdihadeli/mediatr
+module github.com/mehdihadeli/go-mediatr
go 1.18
diff --git a/mediatr_test.go b/mediatr_test.go
index 9b0e49a..e06db92 100644
--- a/mediatr_test.go
+++ b/mediatr_test.go
@@ -45,7 +45,7 @@ func Test_RegisterRequestHandler_Should_Register_All_Handlers(t *testing.T) {
}
func Test_Send_Should_Throw_Error_If_No_Handler_Registered(t *testing.T) {
- expectedErr := fmt.Sprintf("no handlers for command %T", &RequestTest{})
+ expectedErr := fmt.Sprintf("no handlers for request %T", &RequestTest{})
_, err := Send[*RequestTest, *ResponseTest](context.Background(), &RequestTest{Data: "test"})
assert.Containsf(t, err.Error(), expectedErr, "expected error containing %q, got %s", expectedErr, err)
}
diff --git a/readme.md b/readme.md
index 3946bb2..9fd265a 100644
--- a/readme.md
+++ b/readme.md
@@ -5,7 +5,7 @@
-
+
@@ -18,7 +18,7 @@ There are some samples for using this package [here](./examples).
## Installation
```bash
-go get github.com/mehdihadeli/mediatr
+go get github.com/mehdihadeli/go-mediatr
```
## Strategies