
Security News
Meet Socket at Black Hat Europe and BSides London 2025
Socket is heading to London! Stop by our booth or schedule a meeting to see what we've been working on.
github.com/leexikang/gorm-paginator
Advanced tools
go get github.com/biezhi/gorm-paginator/pagination
type User struct {
ID int
UserName string `gorm:"not null;size:100;unique"`
}
var users []User
db = db.Where("id > ?", 0)
pagination.Pagging(&pagination.Param{
DB: db,
Page: 1,
Limit: 3,
OrderBy: []string{"id desc"},
}, &users)
r := gin.Default()
r.GET("/", func(c *gin.Context) {
page, _ := strconv.Atoi(c.DefaultQuery("page", "1"))
limit, _ := strconv.Atoi(c.DefaultQuery("limit", "3"))
var users []User
paginator := pagination.Pagging(&pagination.Param{
DB: db,
Page: page,
Limit: limit,
OrderBy: []string{"id desc"},
ShowSQL: true,
}, &users)
c.JSON(200, paginator)
})
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
Socket is heading to London! Stop by our booth or schedule a meeting to see what we've been working on.

Security News
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.