From b0aa2e407cd888c3af879451336bea5fc35869df Mon Sep 17 00:00:00 2001 From: Manu Mtz-Almeida Date: Thu, 14 May 2015 20:46:57 +0200 Subject: [PATCH] Testing.... --- examples/realtime-advanced/routes.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/examples/realtime-advanced/routes.go b/examples/realtime-advanced/routes.go index 71c2ceb..a582e4c 100644 --- a/examples/realtime-advanced/routes.go +++ b/examples/realtime-advanced/routes.go @@ -13,12 +13,10 @@ import ( func rateLimit(c *gin.Context) { ip := c.ClientIP() value := ips.Add(ip, 1) - if int(value)%200 == 0 { - log.Printf("ip: %s, count: %f\n", ip, value) - } + log.Printf("ip: %s, count: %f\n", ip, value) if value > 300 { if int(value)%200 == 0 { - log.Printf("ip blocked", ip, value) + log.Println("ip blocked") } c.AbortWithStatus(503) }