Releases: petergtz/pegomock
v4.1.0
What's Changed
- rename mockgen variables like
_ret1
,_result
and_params
not to conflict with method args by @krrrr38 in #124 - Explicitly validate the len of params to ensure we don't get index ou… by @AndrewRPorter in #126
New Contributors
- @krrrr38 made their first contribution in #124
- @AndrewRPorter made their first contribution in #126
Full Changelog: v4.0.0...v4.1.0
v4.0.0
Changes
This release removes a lot of cruft from Pegomock. Reflection-based and sourced-based mock generation have been removed, because they don't support generics. The only and default method for mock generation is based on golang.org/x/tools/go/packages
.
It also removes a lot matchers and matcher code, that is not necessary anymore, now that matchers can use generics too.
The README was updated to document these changes.
Migrating code from v3 to v4
Replace all matcher calls such as EqString(...)
and EqInt(...)
with the simpler Eq(...)
.
v3.0.1
v3.0.0
This release drops support for non-Go modules based setups. For those still requiring this support, it's recommended to stick with version 2.
There are no breaking API changes with the switch to v3. Migration from version 1 or 2 involves two steps:
- Change import paths as follows:
-import "github.com/petergtz/pegomock" +import "github.com/petergtz/pegomock/v3"
- Install the latest pegomock binary via
go install github.com/petergtz/pegomock/v3/pegomock@latest
For step 1, make sure to change sub-packages as follows:
-import "github.com/petergtz/pegomock/ginkgo_compatible"
+import "github.com/petergtz/pegomock/v3/ginkgo_compatible"
v2.9.0
v2.8.0
v2.7.0
Sorry, this is basically a release with no changes, but I realized I had published 2.6.0 without having its commits on master and that seemed weird. However, I couldn't just fast-forward master, because it had already diverged. Hence, publishing this pseudo-release. Now everything should be in sync again. Yay!
v2.6.0
v2.5.0
v2.4.0
Changes
- Add support for Go modules, i.e. pegomock can generate mocks in a directory outside of GOPATH (thanks, @MrCreosote)