Skip to content

Commit

Permalink
add uniqueness
Browse files Browse the repository at this point in the history
  • Loading branch information
boyter committed Jan 15, 2025
1 parent 77a63c5 commit 490a99e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd/badges/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,11 @@ func appendLocationLog(log string) {
locationLogMutex.Lock()
defer locationLogMutex.Unlock()

for _, l := range locationLog {
if l == log {
return
}
}
locationLog = append(locationLog, log)

if len(locationLog) > 100 {
Expand Down

0 comments on commit 490a99e

Please sign in to comment.