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

since Go 1.18 'interface{}' can be replaced by 'any' #1763

Closed
wants to merge 1 commit into from

Conversation

mmorel-35
Copy link
Contributor

Description

Use revive rule 'use-any' to ensure that 'any' is used instead of 'interface{}'

@mmorel-35 mmorel-35 marked this pull request as draft December 21, 2024 15:42
@mmorel-35 mmorel-35 closed this Dec 21, 2024
@mmorel-35 mmorel-35 deleted the revive/use-any branch December 21, 2024 15:45
@@ -57,6 +57,9 @@ linters-settings:
recommandations:
- io
- os
revive:
rules:
- name: use-any

Choose a reason for hiding this comment

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

Unfortunately, this is not the way to do with revive.

Or at least, it's not doing exactly what you want

Take a look here

https://github.com/ccoVeille/golangci-lint-config-examples/blob/4480ec8754d46e9993333847e6597141e00d408e/03-safe%2F.golangci.yml#L68-L139

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, that's not really obvious for someone not already familiar with it

Copy link

@ccoVeille ccoVeille left a comment

Choose a reason for hiding this comment

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

I approved by error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants