fix a lint warning from the previous PR

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino 2024-01-10 20:15:51 +01:00
parent c21b434c4e
commit 03ebd5b841
No known key found for this signature in database
GPG key ID: 935D2952DEC4EECF

View file

@ -28,9 +28,9 @@ type HostEvent string
// Supported host events
const (
HostEventLoginFailed HostEvent = "LoginFailed"
HostEventUserNotFound = "UserNotFound"
HostEventNoLoginTried = "NoLoginTried"
HostEventLimitExceeded = "LimitExceeded"
HostEventUserNotFound HostEvent = "UserNotFound"
HostEventNoLoginTried HostEvent = "NoLoginTried"
HostEventLimitExceeded HostEvent = "LimitExceeded"
)
// Supported defender drivers
@ -133,7 +133,7 @@ func (d *baseDefender) getScore(event HostEvent) int {
return score
}
// logEvent do log an defender event which modifies the score of an host
// logEvent logs a defender event that changes a host's score
func (d *baseDefender) logEvent(ip, protocol string, event HostEvent, totalScore int) {
// ignore events which do not change the host score
eventScore := d.getScore(event)
@ -152,7 +152,7 @@ func (d *baseDefender) logEvent(ip, protocol string, event HostEvent, totalScore
Send()
}
// logBan do log a ban of an host due to a too high host score
// logBan logs a host's ban due to a too high host score
func (d *baseDefender) logBan(ip, protocol string) {
logger.GetLogger().Info().
Timestamp().