Skip to content
This repository has been archived by the owner on Jul 31, 2022. It is now read-only.

false positive #5

Closed
jerome-laforge opened this issue Jan 28, 2021 · 2 comments
Closed

false positive #5

jerome-laforge opened this issue Jan 28, 2021 · 2 comments

Comments

@jerome-laforge
Copy link

considering this:

func (r *Request) Parameter(name RequestParameter) (string, bool) {
	idx := r.FindParameter(name)

	if idx < 0 {
		return "", false
	}

	return r.ParamsMembers[idx].Value, true
}

report this:

request.go:48:2: variable 'idx' is only used in the if-statement (request.go:50:2); consider using short syntax (ifshort)
esimonov added a commit that referenced this issue Jan 28, 2021
@esimonov
Copy link
Owner

Thank you @jerome-laforge!

Fixed in d8f3ec1.

@jerome-laforge
Copy link
Author

I will check it with the next version golangci-lint
👍

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

No branches or pull requests

2 participants