mirror of
https://github.com/securego/gosec.git
synced 2024-12-25 12:05:52 +00:00
fix duplicated index issue in Less method
Found using https://go-critic.github.io/overview#dupSubExpr-ref
This commit is contained in:
parent
5fb530cda3
commit
3c8707c6c4
1 changed files with 1 additions and 1 deletions
|
@ -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] }
|
||||
|
||||
|
|
Loading…
Reference in a new issue