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

♻️ refactor: ineffectual assignment and unused variable #995

Merged
merged 1 commit into from Nov 5, 2020

Conversation

ken8203
Copy link
Contributor

@ken8203 ken8203 commented Nov 4, 2020

Summary

Fix ineffectual assignment and remove unused variable.

Ref

Here is the result of golangci-lint of middleware:

middleware/basicauth/basicauth_test.go:82:9: ineffectual assignment to `err` (ineffassign)
		resp, err := app.Test(req)
		      ^
middleware/cache/cache_test.go:32:2: SA4006: this value of `resp` is never used (staticcheck)
	resp, err := app.Test(httptest.NewRequest("GET", "/", nil))
	^
middleware/logger/logger.go:368:4: SA9003: empty branch (staticcheck)
			if _, err := cfg.Output.Write([]byte(err.Error())); err != nil {
			^

@ken8203 ken8203 requested review from codemicro and a team as code owners November 4, 2020 15:31
@ken8203 ken8203 requested review from Fenny and removed request for a team November 4, 2020 15:31
@welcome
Copy link

welcome bot commented Nov 4, 2020

Thanks for opening this pull request! 🎉 Please check out our contributing guidelines. If you need help or want to chat with us, join us on Discord https://gofiber.io/discord

@ken8203 ken8203 changed the title ♻️ refactor: ineffectual assignment and unused variable refactor: ineffectual assignment and unused variable Nov 4, 2020
@ken8203 ken8203 changed the title refactor: ineffectual assignment and unused variable ♻️ refactor: ineffectual assignment and unused variable Nov 4, 2020
@ken8203 ken8203 closed this Nov 4, 2020
@ken8203 ken8203 reopened this Nov 5, 2020
@Fenny Fenny merged commit 0d25f8c into gofiber:master Nov 5, 2020
@welcome
Copy link

welcome bot commented Nov 5, 2020

Congrats on merging your first pull request! 🎉 We here at Fiber are proud of you! If you need help or want to chat with us, join us on Discord https://gofiber.io/discord

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.

None yet

2 participants