
Security News
ESLint Adds Official Support for Linting HTML
ESLint now supports HTML linting with 48 new rules, expanding its language plugin system to cover more of the modern web development stack.
github.com/valenciaj/gg-redis-pool
Simple redis pool middleware for Gin-Gonic framework.
This middleware set on each request a redis connection (new or pooled), and can be accessed with context Get("Redis")
or MustGet("Redis")
method.
package main
import (
ggRedisPool "github.com/valenciaj/gg-redis-pool"
)
// Create server
srv := gin.Default()
dbConnStr =: "redis://@127.0.0.1:6379/0"
// Set middlewares
srv.Use(
gin.Recovery(),
ggRedisPool.Redis(dbConnStr),
)
// ... set other stuff ...
// Set routes
srv.GET("/", func(ctx *gin.Context) {
// With Get method
redisI, err := ctx.Get("Redis")
if err != nil {
panic(err)
}
// Unbox redis connection
redis := redisI.(*DB)
// With MustGet method
redis := ctx.MustGet("Redis").(*DB)
// ... do some stuff with redis connection ...
// Response data
ctx.HTML(200, "welcome/index.tmpl", gin.H{})
})
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ESLint now supports HTML linting with 48 new rules, expanding its language plugin system to cover more of the modern web development stack.
Security News
CISA is discontinuing official RSS support for KEV and cybersecurity alerts, shifting updates to email and social media, disrupting automation workflows.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.