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: modify interface check way #3327

Merged
merged 1 commit into from
Oct 19, 2022

Conversation

demoManito
Copy link
Contributor

  • With pull requests:
    • Open your pull request against master
    • Your pull request should have no more than two commits, if not you should squash them.
    • It should pass all tests in the available continuous integration systems such as GitHub Actions.
    • You should add/modify tests to cover your proposed code changes.
    • If your pull request contains a new feature, please document it on the README.

No need to create variables to validate interfaces, consistent with other code styles, Interface checks: go.dev/doc/effective_go#blank_implements

@appleboy appleboy added this to the v1.9 milestone Oct 19, 2022
@appleboy appleboy merged commit 51aea73 into gin-gonic:master Oct 19, 2022
@L2ncE
Copy link
Contributor

L2ncE commented Nov 3, 2022

Hi! I would like to understand why this change is needed.

@demoManito
Copy link
Contributor Author

Hi! I would like to understand why this change is needed.

@L2ncE This is just to check whether the interface is implemented. It is obviously inappropriate to instantiate a variable.

https://go.dev/doc/effective_go#blank_implements

@L2ncE
Copy link
Contributor

L2ncE commented Nov 4, 2022

Hi! I would like to understand why this change is needed.

@L2ncE This is just to check whether the interface is implemented. It is obviously inappropriate to instantiate a variable.

https://go.dev/doc/effective_go#blank_implements

I got it, thx.

@demoManito demoManito deleted the fix/check-interface branch November 4, 2022 05:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants