fmt code style (#950)
This commit is contained in:
		@ -11,7 +11,6 @@ import (
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func rateLimit(c *gin.Context) {
 | 
			
		||||
 | 
			
		||||
	ip := c.ClientIP()
 | 
			
		||||
	value := int(ips.Add(ip, 1))
 | 
			
		||||
	if value%50 == 0 {
 | 
			
		||||
 | 
			
		||||
@ -8,11 +8,13 @@ import (
 | 
			
		||||
	"github.com/manucorporat/stats"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
var ips = stats.New()
 | 
			
		||||
var messages = stats.New()
 | 
			
		||||
var users = stats.New()
 | 
			
		||||
var mutexStats sync.RWMutex
 | 
			
		||||
var savedStats map[string]uint64
 | 
			
		||||
var (
 | 
			
		||||
	ips        = stats.New()
 | 
			
		||||
	messages   = stats.New()
 | 
			
		||||
	users      = stats.New()
 | 
			
		||||
	mutexStats sync.RWMutex
 | 
			
		||||
	savedStats map[string]uint64
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func statsWorker() {
 | 
			
		||||
	c := time.Tick(1 * time.Second)
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user