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

Add Context #11

Merged
merged 5 commits into from
May 1, 2024
Merged

Add Context #11

merged 5 commits into from
May 1, 2024

Conversation

valxntine
Copy link
Contributor

Adds the ability to include a Context (MockCallLimit) to mock definitions, avoiding the need for raw json definitions.

Note: this is a breaking change, so old projects would either stick to v1.6.0 or have to include an extra nil parameter to their calls of mock.NewDefinition

mock/definition.go Outdated Show resolved Hide resolved
@valxntine
Copy link
Contributor Author

I've moved to a functional options pattern - I can't see a way around the nil check, though, given we need the context block to be omitted from the JSON if not provided.

@danielchurm danielchurm merged commit 015cf97 into Sainsburys:main May 1, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants