MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / removeIPUnsafe

Method removeIPUnsafe

core/init/auth/ip_tracker.go:129–138  ·  view source on GitHub ↗
(ip string)

Source from the content-addressed store, hash-verified

127}
128
129func (t *IPTracker) removeIPUnsafe(ip string) {
130 delete(t.records, ip)
131
132 for i, storedIP := range t.ipOrder {
133 if storedIP == ip {
134 t.ipOrder = append(t.ipOrder[:i], t.ipOrder[i+1:]...)
135 break
136 }
137 }
138}
139
140func (t *IPTracker) removeOldestUnsafe() {
141 if len(t.ipOrder) == 0 {

Callers 5

NeedCaptchaMethod · 0.95
IsLockedMethod · 0.95
SetNeedCaptchaMethod · 0.95
RecordFailureMethod · 0.95
ClearMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected