Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
github.com/pangum/grpc
一个Golang应用程序快速开发框架,有以下特性
Yaml
Toml
Json
XML
Pangu
使用非常简单,只需要定义两部分代码启动方法
和启动器
以及依赖关系
,对于依赖关系
盘古
框架的强项盘古
反而会使代码变多,这个需要大家酌情考虑启动方法
代码如下
package main
import (
`github.com/pangum/pangu`
`github.com/pangum/pangum`
)
func main() {
panic(pangu.New(
pangu.Named(`ziyunix`),
pangu.Banner(`Ziyunix Server`, pangu.BannerTypeAscii),
).Run(newBootstrap))
}
启动器
的代码如下
package main
type bootstrap struct {
application *pangu.Application
}
func newBootstrap(application *pangu.Application) pangu.Bootstrap {
return &bootstrap{
application: application,
}
}
依赖关系
建议像如下处理
package rest
import (
`github.com/pangum/pangu`
)
type Server struct {}
func newServer(/* 如果有依赖,可以在这里增加依赖:api *Api */) *Server {
return new(Server)
}
func init() {
pangu.New().Dependencies(
newServer,
// 其它依赖
// ...
)
}
Pangu
有非常多的配置项,请参看使用文档
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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.