Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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