fix duplicated index issue in Less method

Found using https://go-critic.github.io/overview#dupSubExpr-ref
This commit is contained in:
Iskander Sharipov 2018-07-28 23:18:12 +03:00
parent 5fb530cda3
commit 3c8707c6c4

View file

@ -10,7 +10,7 @@ type sortBySeverity []*gosec.Issue
func (s sortBySeverity) Len() int { return len(s) }
func (s sortBySeverity) Less(i, j int) bool { return s[i].Severity > s[i].Severity }
func (s sortBySeverity) Less(i, j int) bool { return s[i].Severity > s[j].Severity }
func (s sortBySeverity) Swap(i, j int) { s[i], s[j] = s[j], s[i] }