Skip to content

Commit

Permalink
chore(deps): update module gopkg.in/go-playground/validator.v9 to v10 (
Browse files Browse the repository at this point in the history
…#25)

* chore(deps): update module gopkg.in/go-playground/validator.v9 to v10

* chore(deps): update mocks and versions

* chore(deps): fix comment on mockery.yaml

* chore(deps): clean up go.mod

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ivan Maidurov <ivan.maidurov@omnevo.net>
  • Loading branch information
renovate[bot] and IvanMaidurov authored Feb 9, 2024
1 parent e1398d0 commit 0f858a0
Show file tree
Hide file tree
Showing 37 changed files with 1,193 additions and 102 deletions.
38 changes: 34 additions & 4 deletions .mockery.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,34 @@
inpackage: False
testonly: False
with-expecter: True
keeptree: True
# mock might needed in all places
testonly: false
# for better usability of the mocks
with-expecter: true
# less changes in update pull requests
disable-version-string: true
# generate mocks in separate package
inpackage: false
# use original interface name as name, we use a dedicated `mocks` package to make the context clear
mockname: "{{.InterfaceName}}"
# snake case file names
filename: "{{.InterfaceNameSnake}}.go"
# place all mocks in the mocks package
outpkg: "mocks"
# all mocks should live near their interfaces
dir: "{{.InterfaceDirRelative}}/mocks"

# mocks to generate
packages:
"flamingo.me/form/domain":
config:
all: true
recursive: true
"flamingo.me/form/application":
config:
all: true
recursive: true
"github.com/go-playground/validator/v10":
config:
dir: "domain/mocks"
interfaces:
FieldLevel:
StructLevel:
FieldError:
3 changes: 0 additions & 3 deletions application/doc.go

This file was deleted.

3 changes: 1 addition & 2 deletions application/fake/form_handler_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@ package fake
import (
"flamingo.me/form/application"
"flamingo.me/form/domain"
"flamingo.me/form/domain/mocks"
)

type (
// formHandlerBuilderImpl defines faked implementation of FormHandlerBuilder interface used for unit testing
formHandlerBuilderImpl struct {
formHandler *mocks.FormHandler
formHandler domain.FormHandler
}
)

Expand Down
5 changes: 2 additions & 3 deletions application/fake/form_handler_factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,17 @@ package fake
import (
"flamingo.me/form/application"
"flamingo.me/form/domain"
"flamingo.me/form/domain/mocks"
)

type (
// FormHandlerFactoryImpl defines faked implementation of FormHandlerFactory interface used for unit testing
FormHandlerFactoryImpl struct {
formHandler *mocks.FormHandler
formHandler domain.FormHandler
}
)

// New returns faked implementation of FormHandlerFactory interface which should deliver mocked domain.FormHandler instance
func New(formHandler *mocks.FormHandler) application.FormHandlerFactory {
func New(formHandler domain.FormHandler) application.FormHandlerFactory {
return &FormHandlerFactoryImpl{
formHandler: formHandler,
}
Expand Down
3 changes: 1 addition & 2 deletions application/fake/validator.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package fake

import (
"reflect"

"flamingo.me/form/domain/mocks"
"reflect"
)

// NewFieldLevel is helper method to provide mocked instance of validator.FieldLevel interface
Expand Down
2 changes: 1 addition & 1 deletion application/mocks/form_data_encoder_factory.go

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

2 changes: 1 addition & 1 deletion application/mocks/form_handler_builder.go

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

2 changes: 1 addition & 1 deletion application/mocks/form_handler_factory.go

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

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

validator "gopkg.in/go-playground/validator.v9"
"github.com/go-playground/validator/v10"

"flamingo.me/flamingo/v3/framework/web"
"flamingo.me/form/domain"
Expand Down
2 changes: 1 addition & 1 deletion application/validator_provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (

"github.com/stretchr/testify/mock"

validator "github.com/go-playground/validator/v10"
"github.com/stretchr/testify/suite"
validator "gopkg.in/go-playground/validator.v9"

"flamingo.me/flamingo/v3/framework/web"
"flamingo.me/form/domain"
Expand Down
3 changes: 0 additions & 3 deletions domain/doc.go

This file was deleted.

2 changes: 1 addition & 1 deletion domain/mocks/complete_form_service.go

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

2 changes: 1 addition & 1 deletion domain/mocks/default_form_data_decoder.go

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

2 changes: 1 addition & 1 deletion domain/mocks/default_form_data_encoder.go

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

2 changes: 1 addition & 1 deletion domain/mocks/default_form_data_provider.go

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

2 changes: 1 addition & 1 deletion domain/mocks/default_form_data_validator.go

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

Loading

0 comments on commit 0f858a0

Please sign in to comment.