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 pass []any as any by asasalint #13

Closed

Conversation

alingse
Copy link

@alingse alingse commented Jul 7, 2022

i'm write a linter about check pass []any as any in variadic functions

I check the top golang web repo, and found this.

@alingse
Copy link
Author

alingse commented Jul 7, 2022

but, I don't know how to run test on my local machine.

cc @mikestefanello

@mikestefanello
Copy link
Owner

mikestefanello commented Jul 8, 2022

but, I don't know how to run test on my local machine.

Run make up to start the Docker containers, then make test to test.

The test is failing because Controller.Redirect takes in the route name not the actual pattern. It's done this way so you don't duplicate the path/pattern outside of the router.

The other problem is the router isn't built in the Controller tests. So the existing test that's there for redirect is actually not testing anything either.

@mikestefanello mikestefanello added the bug Something isn't working label Jul 8, 2022
@mikestefanello
Copy link
Owner

Thank you for the report. It is certainly a bug and the existing test was both insufficient and non-functional. I went ahead and fixed both directly: fb55c34

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants