From 03ebd5b8415deee0bab11b33c15ad8e6c3ed58ba Mon Sep 17 00:00:00 2001 From: Nicola Murino Date: Wed, 10 Jan 2024 20:15:51 +0100 Subject: [PATCH] fix a lint warning from the previous PR Signed-off-by: Nicola Murino --- internal/common/defender.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/common/defender.go b/internal/common/defender.go index 0086523b..903ca141 100644 --- a/internal/common/defender.go +++ b/internal/common/defender.go @@ -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().