Skip to content

Commit

Permalink
fix(generator): support nil returns when using interface typed params
Browse files Browse the repository at this point in the history
As referenced on #513
Types using generic typed interface params, should allow nil values on return
  • Loading branch information
jfragosoperez committed Nov 13, 2024
1 parent 057cf5e commit 6c7fb6b
Show file tree
Hide file tree
Showing 15 changed files with 291 additions and 98 deletions.
8 changes: 8 additions & 0 deletions .mockery.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,11 @@ packages:
filename: "mock_{{.InterfaceName}}_test.go"
inpackage: True
keeptree: False
github.com/vektra/mockery/v2/pkg/fixtures/iface_typed_param:
config:
all: True
dir: "{{.InterfaceDir}}"
mockname: "{{.InterfaceName}}"
outpkg: "{{.PackageName}}_test"
filename: "{{.InterfaceNameSnake}}_mock_test.go"
keeptree: True

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

51 changes: 49 additions & 2 deletions mocks/github.com/vektra/mockery/v2/pkg/fixtures/Example.go

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

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

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

24 changes: 15 additions & 9 deletions mocks/github.com/vektra/mockery/v2/pkg/fixtures/ReplaceGeneric.go

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

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

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

17 changes: 10 additions & 7 deletions mocks/github.com/vektra/mockery/v2/pkg/fixtures/Variadic.go

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

Loading

0 comments on commit 6c7fb6b

Please sign in to comment.