Skip to content

Commit

Permalink
fix a lint warning from the previous PR
Browse files Browse the repository at this point in the history
Signed-off-by: Nicola Murino <[email protected]>
  • Loading branch information
drakkan committed Jan 10, 2024
1 parent c21b434 commit 03ebd5b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions internal/common/defender.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand All @@ -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().
Expand Down

0 comments on commit 03ebd5b

Please sign in to comment.