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

fix: remove unexported method v3 Service interface #150

Merged

Conversation

dkoshkin
Copy link
Contributor

@dkoshkin dkoshkin commented Jan 4, 2024

Having an unexported method in an interface makes it not possible to implement from a different package

e.g. Trying to create a mock implementation leads to this error:

Type cannot implement 'Service' as it has a non-exported method and is defined in a different package

Having an unexported method in an interface makes it not possible to implement from a different package

e.g. Trying to create a mock implementation leads to this error:
Type cannot implement 'Service' as it has a non-exported method and is defined in a different package
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (e26318d) 54.30% compared to head (3a81f5d) 54.30%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #150   +/-   ##
=======================================
  Coverage   54.30%   54.30%           
=======================================
  Files          20       20           
  Lines        1799     1799           
=======================================
  Hits          977      977           
  Misses        822      822           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dkoshkin
Copy link
Contributor Author

dkoshkin commented Jan 5, 2024

@yannickstruyf3 @tuxtof FYI. (For some reason I can't add you as reviewers)

Copy link
Contributor

@tuxtof tuxtof left a comment

Choose a reason for hiding this comment

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

LGTM

@deepakm-ntnx
Copy link
Contributor

deepakm-ntnx commented Jan 5, 2024

this method exists in the same file?

listServiceGroups(ctx context.Context, getEntitiesRequest *DSMetadata) (*ServiceGroupListResponse, error)
--
 
2190 | func (op Operations) listServiceGroups(ctx context.Context, getEntitiesRequest *DSMetadata) (*ServiceGroupListResponse,…

we can make it capital letter. just want to confirm if it needs to be exported. am sure no one might be using it then outside

@deepakm-ntnx
Copy link
Contributor

/lgtm

@thunderboltsid thunderboltsid merged commit 8724a6b into nutanix-cloud-native:main Jan 5, 2024
3 of 4 checks passed
@dkoshkin dkoshkin deleted the fix-v3-service-interface branch January 5, 2024 22:59
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.

5 participants