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

mock: deprecate type AnythingOfTypeArgument (#1434) #1441

Merged
merged 1 commit into from Aug 8, 2023

Conversation

dolmen
Copy link
Collaborator

@dolmen dolmen commented Jul 31, 2023

Summary

Deprecate mock.AnythingOfTypeArgument which should never have been publicly exposed.

AnythingOfTypeArgument is now a type alias to the private anythingOfTypeArgument and is marked as Deprecated in godoc. The AnythingOfType constructor is still available.

The aim is to completely remove that alias.

Changes

  • Rename AnythingOfTypeArgument to anythingOfTypeArgument.
  • Add back AnythingOfTypeArgument as a type alias of anythingOfTypeArgument.
  • Mark AnythingOfTypeArgument as Deprecated in godoc.
  • Documentation is improved to hide implementation details.

Motivation

API cleanup.

Related issues

Closes #1434

@dolmen dolmen self-assigned this Jul 31, 2023
@dolmen dolmen added bug pkg-mock Any issues related to Mock labels Jul 31, 2023
Copy link
Collaborator

@brackendawson brackendawson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is another detail that has always bugged me, I'm in favuor of assisting consumers by marking it as deprecated. We would have to wait for a major version bump to remove it.

Deprecate mock.AnythingOfTypeArgument which should never have been
publicly exposed.

AnythingOfTypeArgument is now a type alias to the private
anythingOfTypeArgument and is marked as Deprecated in godoc.
The AnythingOfType constructor is still available.

The aim is to completely remove that alias.
@dolmen dolmen force-pushed the mock-deprecate-AnythingOfTypeArgument branch from c2be2cc to f24f3ba Compare August 8, 2023 09:05
@dolmen dolmen merged commit 882382d into master Aug 8, 2023
12 checks passed
@dolmen dolmen changed the title mock: deprecate AnythingOfTypeArgument (#1434) mock: deprecate type AnythingOfTypeArgument (#1434) Aug 11, 2023
@dolmen dolmen added the internal/cleanup Internal change to ease maintenance without external impact label Mar 5, 2024
@dolmen dolmen deleted the mock-deprecate-AnythingOfTypeArgument branch March 5, 2024 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug internal/cleanup Internal change to ease maintenance without external impact mock.ArgumentMatcher About matching arguments in mock pkg-mock Any issues related to Mock
Projects
None yet
Development

Successfully merging this pull request may close these issues.

mock: deprecate type AnythingOfTypeArgument
2 participants