// AddIP creates a new rate limiter and adds it to the ips map,
// using the IP address as the key
AddIP creates a new rate limiter and adds it to the ips map,
using the IP address as the key
// AddIP creates a new rate limiter and adds it to the ips map // using the IP address as the key
func (i *IPRateLimiter) AddUsername(username string) *rate.Limiter {
    i.mu.Lock()
    defer i.mu.Unlock()
    limiter := rate.NewLimiter(i.r, i.b)
    i.ips[username] = limiter
    return limiter
}
func ( i * IPRateLimiter ) AddUsername ( username string ) * rate . Limiter { i . mu . Lock ( ) defer i . mu . Unlock ( ) limiter := rate . NewLimiter ( i . r , i . b ) i . ips [ username ] = limiter return limiter }
AddIP creates a new rate limiter and adds it to the ips map,
using the IP address as the key
AddIP creates a new rate limiter and adds it to the ips map using the IP address as the key