clearAllBadges removes all badges from the transient store.
()
| 127 | |
| 128 | // clearAllBadges removes all badges from the transient store. |
| 129 | func clearAllBadges() { |
| 130 | globalBadgeStore.lock.Lock() |
| 131 | defer globalBadgeStore.lock.Unlock() |
| 132 | |
| 133 | count := len(globalBadgeStore.transient) |
| 134 | globalBadgeStore.transient = make(map[string]baseds.Badge) |
| 135 | log.Printf("badge store: cleared all %d badges\n", count) |
| 136 | } |
| 137 | |
| 138 | // GetAllBadges returns a snapshot of all currently active badges. |
| 139 | func GetAllBadges() []baseds.BadgeEvent { |