Skip to content
This repository has been archived by the owner on Jun 27, 2023. It is now read-only.

Commit

Permalink
record invocation arguments in generated code
Browse files Browse the repository at this point in the history
resolves #554
  • Loading branch information
kucherenkovova committed Jul 10, 2023
1 parent dac4550 commit f7ed795
Show file tree
Hide file tree
Showing 29 changed files with 114 additions and 0 deletions.
4 changes: 4 additions & 0 deletions gomock/internal/mock_gomock/mock_matcher.go

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

4 changes: 4 additions & 0 deletions gomock/mock_test.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.

4 changes: 4 additions & 0 deletions mockgen/internal/tests/const_array_length/mock.go

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

4 changes: 4 additions & 0 deletions mockgen/internal/tests/copyright_file/mock.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.

4 changes: 4 additions & 0 deletions mockgen/internal/tests/dot_imports/mock.go

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

4 changes: 4 additions & 0 deletions mockgen/internal/tests/empty_interface/mock.go

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

4 changes: 4 additions & 0 deletions mockgen/internal/tests/extra_import/mock.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.

4 changes: 4 additions & 0 deletions mockgen/internal/tests/import_embedded_interface/net_mock.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.

4 changes: 4 additions & 0 deletions mockgen/internal/tests/import_source/source_mock.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.

4 changes: 4 additions & 0 deletions mockgen/internal/tests/missing_import/output/source_mock.go

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

4 changes: 4 additions & 0 deletions mockgen/internal/tests/mock_in_test_package/mock_test.go

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

4 changes: 4 additions & 0 deletions mockgen/internal/tests/overlapping_methods/mock.go

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

4 changes: 4 additions & 0 deletions mockgen/internal/tests/panicing_test/mock_test.go

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

4 changes: 4 additions & 0 deletions mockgen/internal/tests/self_package/mock.go

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

4 changes: 4 additions & 0 deletions mockgen/internal/tests/test_package/mock_test.go

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

4 changes: 4 additions & 0 deletions mockgen/internal/tests/unexported_method/bugreport_mock.go

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

4 changes: 4 additions & 0 deletions mockgen/internal/tests/vendor_dep/mock.go

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

4 changes: 4 additions & 0 deletions mockgen/internal/tests/vendor_dep/source_mock_package/mock.go

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

4 changes: 4 additions & 0 deletions mockgen/internal/tests/vendor_pkg/mock.go

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

2 changes: 2 additions & 0 deletions mockgen/mockgen.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,8 @@ func (g *generator) Generate(pkg *model.Package, outputPkgName string, outputPac
g.p("// Source: %v (interfaces: %v)", g.srcPackage, g.srcInterfaces)
}
g.p("")
g.p("// Generated by this command:")
g.p("// %v", strings.Join(os.Args, " "))

// Get all required imports, and generate unique names for them all.
im := pkg.Imports()
Expand Down
4 changes: 4 additions & 0 deletions sample/concurrent/mock/concurrent_mock.go

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

4 changes: 4 additions & 0 deletions sample/mock_user_test.go

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

0 comments on commit f7ed795

Please sign in to comment.